attach hooks to Request
authorKenneth Reitz <me@kennethreitz.com>
Wed, 17 Aug 2011 04:27:41 +0000 (00:27 -0400)
committerKenneth Reitz <me@kennethreitz.com>
Wed, 17 Aug 2011 04:27:41 +0000 (00:27 -0400)
requests/api.py

index d81a56d..e6ff715 100644 (file)
@@ -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()