File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ We can read the content of the server's response. Consider the GitHub timeline
8181again::
8282
8383 >>> import requests
84- >>> r = requests.get('https://github.com/timeline.json ')
84+ >>> r = requests.get('https://api. github.com/events ')
8585 >>> r.text
8686 u'[{"repository":{"open_issues":0,"url":"https://github.com/...
8787
@@ -134,7 +134,7 @@ JSON Response Content
134134There's also a builtin JSON decoder, in case you're dealing with JSON data::
135135
136136 >>> import requests
137- >>> r = requests.get('https://github.com/timeline.json ')
137+ >>> r = requests.get('https://api. github.com/events ')
138138 >>> r.json()
139139 [{u'repository': {u'open_issues': 0, u'url': 'https://github.com/...
140140
@@ -150,7 +150,7 @@ In the rare case that you'd like to get the raw socket response from the
150150server, you can access ``r.raw ``. If you want to do this, make sure you set
151151``stream=True `` in your initial request. Once you do, you can do this::
152152
153- >>> r = requests.get('https://github.com/timeline.json ', stream=True)
153+ >>> r = requests.get('https://api. github.com/events ', stream=True)
154154 >>> r.raw
155155 <requests.packages.urllib3.response.HTTPResponse object at 0x101194810>
156156 >>> r.raw.read(10)
You can’t perform that action at this time.
0 commit comments