title: Correct way to make a Python HTTPS request using requests module?
body: <p>I have to make an HTTPS request in Python, and I am using the requests module to try to make my life easier. </p>
  
  <p>The request needs to have a header and 3 FORM parameters URL encoded. This is what I am doing: </p>
  
  <pre><code>header = {'Content-type': 'application/x-www-form-urlencoded', 'Authorization':'Basic ' + encoded_string, 'Connection': 'Keep-Alive', 'Host':'host.host.com'}
  
  payload='grant_type=authorization_code&amp;code=' + request.args['code'] + '&amp;state=' + request.args['state'] + '&amp;redirect_uri=http://xxx.xyz.com/request_listener'
  
  url = 'https://serviceprovider.xxx.com/auth/j_oauth_resolve_access_code'
  
  response = requests.post(url, data=payload, headers=header, verify=False)
  </code></pre>
  
  <p>When I try to return the <code>content</code> or <code>text</code> of the <code>response</code>, I get an empty string. However, when I print the actual <code>response</code> object, it says it is a <code>&lt;Response [200]&gt;</code>, but if this were actually a 200 OK then the server I am POSTing too should go to the redirect_uri I have specified and I would get a notification there. </p>
  
  <p>This is not happening, and I am mystified as to why.</p>