mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
attach hooks to Request
This commit is contained in:
+2
-2
@@ -50,12 +50,12 @@ def request(method, url,
|
||||
auth = auth,
|
||||
timeout = timeout or config.settings.timeout,
|
||||
allow_redirects = allow_redirects,
|
||||
proxies = proxies or config.settings.proxies
|
||||
proxies = proxies or config.settings.proxies,
|
||||
)
|
||||
|
||||
args = dispatch_hook('args', hooks, args)
|
||||
|
||||
r = Request(**args)
|
||||
r = Request(hooks=hooks, **args)
|
||||
|
||||
r.send()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user