mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Merge pull request #2493 from yasoob/master
made the quickstart more reader friendly
This commit is contained in:
@@ -186,10 +186,9 @@ For example, we didn't specify our content-type in the previous example::
|
||||
|
||||
>>> import json
|
||||
>>> url = 'https://api.github.com/some/endpoint'
|
||||
>>> payload = {'some': 'data'}
|
||||
>>> headers = {'content-type': 'application/json'}
|
||||
>>> headers = {'user-agent': 'my-app/0.0.1'}
|
||||
|
||||
>>> r = requests.post(url, data=json.dumps(payload), headers=headers)
|
||||
>>> r = requests.get(url, headers=headers)
|
||||
|
||||
|
||||
More complicated POST requests
|
||||
|
||||
Reference in New Issue
Block a user