title: How do I pass raw POST data into urllib3?
body: <p>Trying to use urllib3 to post JSON-encoded data.
  Just want my POST payload to be raw JSON string, with content type application/json.
  I just cannot see how to do this.</p>
  
  <p>The urllib3 documentation describes posting data in "fields", i.e. dicts with (key,value) pairs, like how HTML forms are URL-encoded with the URL. But I don't want to do that.</p>
  
  <p>The closest I've been able to get is this (I just guessed where to put the data, as it's not documented anywhere that I can find):</p>
  
  <pre><code>http = urllib3.PoolManager()
  headers = urllib3.util.make_headers(basic_auth=key+":")
  r = http.request_encode_body('POST', path, json.dumps(payload), headers=headers)
  </code></pre>
  
  <p>which causes this urllib3 error:</p>
  
  <pre><code>File "C:\Python27\lib\site-packages\urllib3-1.7.1-py2.7.egg\urllib3\filepost.py", line 44, in iter_field_objects
  yield RequestField.from_tuples(*field)
  TypeError: from_tuples() takes exactly 3 arguments (2 given)
  </code></pre>
  
  <p>Thanks for any pointers!</p>