Skip to content
Myr

remove extra mention of dangerous `r.raw`

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

authored by homm · committed by homm · parent 917a15f · Browse files · 2 files+6 added−5 removed
This commit

State

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

Diff stats

2 files+6 added−5 removed

  • other:+6 added−5 removed

2 files+6 added−5 removed

modified:docs/user/advanced.rst+1 added-1 removed
159 unmodified lines
160 if int(r.headers['content-length']) < TOO_LONG:161 content = r.content162 ...163164You can further control the workflow by use of the :class:`Response.iter_content` and :class:`Response.iter_lines` methods, or reading from the underlying urllib3 :class:`urllib3.HTTPResponse` at :class:`Response.raw`.164You can further control the workflow by use of the :class:`Response.iter_content` and :class:`Response.iter_lines` methods.165166167Keep-Alive168----------
426 unmodified lines
modified:docs/api.rst+5 added-4 removed
145 unmodified lines
146.. _requests-kerberos: https://github.com/requests/requests-kerberos147148* The parameter for streaming requests was changed from ``prefetch`` to149 ``stream`` and the logic was inverted. In addition, ``stream`` is now150 required for raw response reading.150 required for chunked response reading.151152 ::153154 # in 0.x, passing prefetch=False would accomplish the same thing155 r = requests.get('https://github.com/timeline.json', stream=True)156 r.raw.read(10)156 for chunk in r.iter_content(8192):157 ...158159* The ``config`` parameter to the requests method has been removed. Some of160 these options are now configured on a ``Session`` such as keep-alive and161 maximum number of redirects. The verbosity option should be handled by
8 unmodified lines
170 # you will see the REQUEST, including HEADERS and DATA, and RESPONSE with HEADERS but without DATA.171 # the only thing missing will be the response.body which is not logged.172 import httplib173 httplib.HTTPConnection.debuglevel = 1173 174175 logging.basicConfig() # you need to initialize logging, otherwise you will not see anything from requests176 logging.getLogger().setLevel(logging.DEBUG)177 requests_log = logging.getLogger("requests.packages.urllib3")178 requests_log.setLevel(logging.DEBUG)179 requests_log.propagate = True179 180181 requests.get('http://httpbin.org/headers')182183184
11 unmodified lines