Form Encoded Data

suggest change
from requests import post

payload = {'key1' : 'value1',
           'key2' : 'value2'
           }

foo = post('http://httpbin.org/post', data=payload)

To pass form-encoded data with the post operation, data must be structured as a dictionary and supplied as the data parameter.

If the data should not be form-encoded, pass a string or bytes as the data parameter. An integer is not accepted.

Supply the dictionary to the json parameter for Requests to format the data automatically:

from requests import post

payload = {'key1' : 'value1', 'key2' : 'value2'}

foo = post('http://httpbin.org/post', json=payload)

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents