Skip to content
Myr

prefetching on all methods

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 bd45bc7 · Browse files · 2 files+6 added−3 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−3 removed

  • other:+6 added−3 removed

2 files+6 added−3 removed

modified:requests/api.py+2 added-1 removed
26 unmodified lines
27 allow_redirects=False,28 proxies=None,29 hooks=None,30 return_response=True,31 prefetch=False,32 config=None):33 """Constructs and sends a :class:`Request <Request>`.34 Returns :class:`Response <Response>` object.35
15 unmodified lines
51 s = session()52 return s.request(53 method, url, params, data, headers, cookies, files, auth,54 timeout, allow_redirects, proxies, hooks, return_response,54 config55 config, prefetch56 )575859
63 unmodified lines
modified:requests/sessions.py+4 added-2 removed
110 unmodified lines
111 allow_redirects=False,112 proxies=None,113 hooks=None,114 return_response=True,115 config=None):115 config=None,116 prefetch=False):117118 """Constructs and sends a :class:`Request <Request>`.119 Returns :class:`Response <Response>` object.120
9 unmodified lines
130 :param allow_redirects: (optional) Boolean. Set to True if POST/PUT/DELETE redirect following is allowed.131 :param proxies: (optional) Dictionary mapping protocol to the URL of the proxy.132 :param return_response: (optional) If False, an un-sent Request object will returned.133 :param config: (optional) A configuration dictionary.134 :param prefetch: (optional) if ``True``, the response content will be immediately downloaded.135 """136137 method = str(method).upper()138
39 unmodified lines
178 if not return_response:179 return r180181 # Send the HTTP Request.180 r.send()182 r.send(prefetch=prefetch)183184 # Send any cookies back up the to the session.185 self.cookies.update(r.response.cookies)186
74 unmodified lines