Skip to content
Myr

Update api.rst (#5877)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Steve Berdy · committed by GitHub · parent a1a6a54 · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:docs/api.rst+2 added-2 removed
125 unmodified lines
126127 ::128129 import requests130 r = requests.get('https://github.com/timeline.json')130 r = requests.get('https://api.github.com/events')131 r.json() # This *call* raises an exception if JSON decoding fails132133* The ``Session`` API has changed. Sessions objects no longer take parameters.134 ``Session`` is also now capitalized, but it can still be
20 unmodified lines
155156 ::157158 # in 0.x, passing prefetch=False would accomplish the same thing159 r = requests.get('https://github.com/timeline.json', stream=True)159 r = requests.get('https://api.github.com/events', stream=True)160 for chunk in r.iter_content(8192):161 ...162163* The ``config`` parameter to the requests method has been removed. Some of
97 unmodified lines