Skip to content
Myr

moved call to pre_request hook, allowing for more meaningful use.

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

authored by Mastahyeti · committed by Mastahyeti · parent 50298bb · 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
150 unmodified lines
151152 self.headers = headers153 self._poolmanager = _poolmanager154155 # Pre-request hook.156 r = dispatch_hook('pre_request', hooks, self)157 self.__dict__.update(r.__dict__)155159156 def __repr__(self):157 return '<Request [%s]>' % (self.method)158159
343 unmodified lines
503 cookie_header = c.output(header='', sep='; ').strip()504505 # Attach Cookie header to request.506 self.headers['Cookie'] = cookie_header507 508 # Pre-request hook.509 r = dispatch_hook('pre_request', self.hooks, self)510 self.__dict__.update(r.__dict__)511512 try:513 # The inner try .. except re-raises certain exceptions as514 # internal exception types; the outer suppresses exceptions
290 unmodified lines