From 6e2f1eb402096dfce912f7ff44cae55e466c3afc Mon Sep 17 00:00:00 2001 From: =?utf8?q?M=2EYasoob=20Ullah=20Khalid=20=E2=98=BA?= Date: Sun, 15 Mar 2015 01:02:09 +0500 Subject: [PATCH] made the quickstart more reader friendly. Closes #2418 --- docs/user/quickstart.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/user/quickstart.rst b/docs/user/quickstart.rst index 6fd3602..6573b46 100644 --- a/docs/user/quickstart.rst +++ b/docs/user/quickstart.rst @@ -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 -- 2.34.1