diff --git a/requests/async.py b/requests/async.py index db25f6a5..e14ac946 100644 --- a/requests/async.py +++ b/requests/async.py @@ -45,12 +45,6 @@ def _send(r, pools=None): r.send() - # Post-request hook. - r = dispatch_hook('post_request', r.hooks, r) - - # Response manipulation hook. - r.response = dispatch_hook('response', r.hooks, r.response) - return r.response diff --git a/requests/sessions.py b/requests/sessions.py index a88a0626..f1124ae2 100644 --- a/requests/sessions.py +++ b/requests/sessions.py @@ -157,14 +157,8 @@ class Session(object): args[attr] = merge_kwargs(local_val, session_val) - # Arguments manipulation hook. - args = dispatch_hook('args', hooks, args) - r = Request(**args) - # Pre-request hook. - r = dispatch_hook('pre_request', hooks, r) - # Don't send if asked nicely. if not return_response: return r @@ -172,12 +166,6 @@ class Session(object): # Send the HTTP Request. r.send() - # Post-request hook. - r = dispatch_hook('post_request', hooks, r) - - # Response manipulation hook. - r.response = dispatch_hook('response', hooks, r.response) - return r.response