title: Sending POST request to an Endpoint results in "binding element must be a struct"
body: <p>I have an endpoint that I wrote in Go using the Echo library. I am trying to POST data via a python script, but am getting a &quot;binding element must be a struct&quot; error.</p>
  <p>Code from Endpoint where I bind the request body to a variable (Go lang):</p>
  <pre><code>// get body from request
  requestBody := make(map[string]interface{})
      if err := c.Bind(&amp;requestBody); err != nil {
          return err
      }
  </code></pre>
  <p>Python script:</p>
  <pre><code>data = {
      &quot;AED&quot;: {
          &quot;USD&quot;: 0.2719
          },
      &quot;ARS&quot;: {
          &quot;USD&quot;: 0.0142
      }
  }
  
   headers = {
          &quot;Authorization&quot;: # my_jwt_token,
          &quot;API-Key&quot;: # my api_key
      }
  
   requests.put(url, data=payload, headers=headers)
   
   if not response.ok:
       raise Exception(&quot;Failed to update&quot;)
  
   return result.status_code
  </code></pre>
  <p>Error message:</p>
  <pre><code>{&quot;logType&quot;:&quot;application&quot;,&quot;msg&quot;:&quot;Status: 400, Error: code=400, message=binding element must be a struct, Title: Client Error, Message: binding element must be a struct, Detail: &quot;,&quot;action&quot;:&quot;Error Handler&quot;,&quot;level&quot;:&quot;error&quot;,&quot;timestamp&quot;:&quot;2020-07-13T13:39:19-07:00&quot;}
  </code></pre>
  <p>Why is this happening? I can use Postman to send the exact same Payload and it works fine, but sending a PUT request with python requests library does not work.</p>