Skip to content
Myr

Merge branch 'develop' of https://github.com/joequery/requests into develop

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parents fad1c66, 1031ec4 · Browse files · 1 file+19 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+19 added−0 removed

  • other:+19 added−0 removed

1 file+19 added−0 removed

modified:docs/user/quickstart.rst+19 added
38 unmodified lines
39 >>> r.content40 '[{"repository":{"open_issues":0,"url":"https://github.com/...414243Make a POST Request44------------------4546POST requests are equally simple ::4748 >>> r = requests.post("http://httpbin.org/post")49 5051Suppose you want to send data over HTTP. Simply pass a data52argument to the requests.post method with your dictionary ::5354 >>> dataDict = {"key1":"value1", "key2":"value2"}55 >>> r = requests.post("http://httpbin.org/post", data=dataDict)56 >>> r.content57 '{\n "origin": "::ffff:YourIpAddress", \n "files": {}, \n "form": {\n "key2": "value2", \n "key1": "value1"\n }, ...5859Note the data= argument is equivalent to -d in cURL scripts. dataDict will60be form-encoded. 6162Response Status Codes63---------------------6465We can check the response status code::
116 unmodified lines