title: Unable to resolve " not a valid key=value pair (missing equal-sign) in Authorization header" when POSTing to api gateway
body: <p>I created an api-gateway to put data in my s3 bucket. When I test it in console it works with no problem. Even when I test my token in the authorizer test it returns an "Allow", so there's nothing wrong with my token. My token validation is </p>
  
  <pre><code>^Bearer [-0-9a-zA-z\.]*$
  </code></pre>
  
  <p>so my python code for generating my header looks like this:</p>
  
  <pre><code>headers = {
      "Authorization": "Bearer " + token,
      "Content-type": "application/json"
  }
  </code></pre>
  
  <p>The rest of my code is:</p>
  
  <pre><code>response = requests.post(url, headers=headers, data={"id":"0678a93d-ee8c-4db5-a831-1e311be4f04b", "test":"12345"})
  print(response.text)
  </code></pre>
  
  <p>The error message I get is 
  "{"message":"'{My Token}' not a valid key=value pair (missing equal-sign) in Authorization header: 'Bearer {My Token}'."}" </p>
  
  <p>My url looks like this:</p>
  
  <p><a href="https://my-api-gateway.amazonaws.com/MyStage" rel="noreferrer">https://my-api-gateway.amazonaws.com/MyStage</a>, and I am using a {proxy+} in my resources. I noticed if I change my header from Content-type to Accept, it gives me the same error, but if I also change my url to <a href="https://my-api-gateway.amazonaws.com/MyStage/any-arbitrary-string/" rel="noreferrer">https://my-api-gateway.amazonaws.com/MyStage/any-arbitrary-string/</a>, I get a </p>
  
  <pre><code>   {"response":{"status":"VALID", "message": "success"}} 
  
  </code></pre>
  
  <p>but the file does not show up in my s3 bucket. How do I resolve this? </p>