Skip to content
Myr

store hooks in Request.

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 5537902 · Browse files · 2 files+4 added−1 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+4 added−1 removed

  • other:+4 added−1 removed

2 files+4 added−1 removed

modified:requests/api.py+1 added
52 unmodified lines
53 headers = headers,54 cookiejar = cookies,55 files = files,56 auth = auth,57 hooks = hooks,58 timeout = timeout or config.settings.timeout,59 allow_redirects = allow_redirects,60 proxies = proxies or config.settings.proxies,61 )
131 unmodified lines
modified:requests/models.py+3 added-1 removed
35 unmodified lines
3637 def __init__(self,38 url=None, headers=dict(), files=None, method=None, data=dict(),39 params=dict(), auth=None, cookiejar=None, timeout=None, redirect=False,40 allow_redirects=False, proxies=None):40 allow_redirects=False, proxies=None, hooks=None):4142 #: Float describ the timeout of the request.43 # (Use socket.setdefaulttimeout() as fallback)44 self.timeout = timeout
48 unmodified lines
9394 #: True if Request has been sent.95 self.sent = False9697 #: Event-handling hooks.98 self.hooks = hooks99100 # Header manipulation and defaults.101102 if settings.accept_gzip:
521 unmodified lines