made the quickstart more reader friendly. Closes #2418

This commit is contained in:
M.Yasoob Ullah Khalid ☺
2015-03-15 01:02:09 +05:00
parent fa338da717
commit 6e2f1eb402
+2 -3
View File
@@ -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': 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36'}
>>> r = requests.post(url, data=json.dumps(payload), headers=headers)
>>> r = requests.get(url, headers=headers)
More complicated POST requests