Skip to content
Myr

Merge pull request #516 from EnTeQuAk/move_pre_request

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Move pre_request to a more usable place, followup to #382

authored by Kenneth Reitz · committed by Kenneth Reitz · parents a9963e3, f259018 · Browse files · 1 file+4 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−4 removed

  • other:+4 added−4 removed

1 file+4 added−4 removed

modified:requests/models.py+4 added-4 removed
459 unmodified lines
460461 # Build the URL462 url = self.full_url463464 # Pre-request hook.465 r = dispatch_hook('pre_request', self.hooks, self)466 self.__dict__.update(r.__dict__)467468 # Logging469 if self.config.get('verbose'):470 self.config.get('verbose').write('%s %s %s\n' % (471 datetime.now().isoformat(), self.method, url
97 unmodified lines
569 cookie_header = get_cookie_header(self.cookies, self)570 if cookie_header is not None:571 self.headers['Cookie'] = cookie_header572569 # Pre-request hook.570 r = dispatch_hook('pre_request', self.hooks, self)571 self.__dict__.update(r.__dict__)572573 try:574 # The inner try .. except re-raises certain exceptions as575 # internal exception types; the outer suppresses exceptions576 # when safe mode is set.
261 unmodified lines