Skip to content
Myr

Cookie persistence!

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 498b446 · Browse files · 1 file+8 added−0 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+8 added−0 removed

  • other:+8 added−0 removed

1 file+8 added−0 removed

modified:requests/sessions.py+8 added
85 unmodified lines
8687 # Set up a CookieJar to be used by default88 self.cookies = {}8990 if cookies is not None:91 self.cookies.update(cookies)9293 def __repr__(self):94 return '<requests-client at 0x%x>' % (id(self))9596 def __enter__(self):
70 unmodified lines
167168 # Arguments manipulation hook.169 args = dispatch_hook('args', args['hooks'], args)170171 # Create the (empty) response.172 r = Request(**args)173174 # Don't send if asked nicely.175 if not return_response:
1 unmodified line
177178 # Send the HTTP Request.179 r.send()180181 # Send any cookies back up the to the session.182 self.cookies.update(r.response.cookies)183184 # Return the response.185 return r.response186187188 def get(self, url, **kwargs):
69 unmodified lines