Skip to content
Myr

further cleanup examples

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

authored by Kenneth Reitz · committed by Kenneth Reitz · parent a9839dc · Browse files · 1 file+14 added−13 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+14 added−13 removed

  • other:+14 added−13 removed

1 file+14 added−13 removed

modified:docs/user/advanced.rst+14 added-13 removed
122 unmodified lines
123124 from requests import Request, Session125126 s = Session()127 req = Request('GET', # or any other method, 'POST', 'PUT', etc.128 url,129 data=data130 headers=headers131 # ...132 )127 req = Request('GET', url,128 data=data129 headers=headers130 )131132 prepped = s.prepare_request(req)133134 # do something with prepped.body135 # do something with prepped.headers136137 resp = s.send(prepped,137 stream=stream,138 verify=verify,139 proxies=proxies,140 cert=cert,141 timeout=timeout,142 # etc.143 )138 stream=stream,139 verify=verify,140 proxies=proxies,141 cert=cert,142 timeout=timeout143 )144145 print(resp.status_code)146147SSL Cert Verification148---------------------
480 unmodified lines