Skip to content
Myr

give Request session reference for parameter+redirects

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

authored by Kenneth Reitz · committed by Kenneth Reitz · parent 474e17b · Browse files · 2 files+5 added−2 removed
This commit

State

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

Diff stats

2 files+5 added−2 removed

  • other:+5 added−2 removed

2 files+5 added−2 removed

modified:requests/models.py+4 added-2 removed
12 unmodified lines
1314from urlparse import urlparse, urlunparse, urljoin15from datetime import datetime161717from .auth import dispatch as auth_dispatch18from .hooks import dispatch_hook19from .structures import CaseInsensitiveDict20from .status_codes import codes
94 unmodified lines
115116 #: Event-handling hooks.117 self.hooks = hooks118119 #: Session.120 self.session = None121122 if headers:123 headers = CaseInsensitiveDict(self.headers)124 else:125 headers = CaseInsensitiveDict()
109 unmodified lines
235 url=url,236 headers=headers,237 files=self.files,238 method=method,237 # params=self.params,239 params=self.session.params,240 auth=self._auth,241 cookies=cookies,242 redirect=True,243 config=self.config,
349 unmodified lines
modified:requests/sessions.py+1 added
173 unmodified lines
174 args = dispatch_hook('args', args['hooks'], args)175176 # Create the (empty) response.177 r = Request(**args)178 r.session = self179180 # Don't send if asked nicely.181 if not return_response:182 return r
92 unmodified lines