Update api.rst (#5877)

This commit is contained in:
Steve Berdy
2021-07-16 14:06:42 -04:00
committed by GitHub
parent a1a6a549a0
commit a5b45edf2f
+2 -2
View File
@@ -127,7 +127,7 @@ API Changes
::
import requests
r = requests.get('https://github.com/timeline.json')
r = requests.get('https://api.github.com/events')
r.json() # This *call* raises an exception if JSON decoding fails
* The ``Session`` API has changed. Sessions objects no longer take parameters.
@@ -156,7 +156,7 @@ API Changes
::
# in 0.x, passing prefetch=False would accomplish the same thing
r = requests.get('https://github.com/timeline.json', stream=True)
r = requests.get('https://api.github.com/events', stream=True)
for chunk in r.iter_content(8192):
...