Skip to content
Myr

doctoring for Session

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 5bb1881 · Browse files · 1 file+5 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+5 added−0 removed

  • other:+5 added−0 removed

1 file+5 added−0 removed

modified:requests/sessions.py+5 added
11 unmodified lines
12import requests.api13import cookielib1415class Session(object):16 """A Requests session."""1718 __attrs__ = ['headers', 'cookies', 'auth', 'timeout', 'proxies']192021 def __init__(self, **kwargs):2223 # Set up a CookieJar to be used by default24 self.cookies = cookielib.FileCookieJar()
4 unmodified lines
2930 # Map and wrap requests.api methods31 self._map_api_methods()323334 def __repr__(self):35 return '<requests-client at 0x%x>' % (id(self))363738 def _map_api_methods(self):39 """Reads each available method from requests.api and decorates40 them with a wrapper, which inserts any instance-local attributes41 (from __attrs__) that have been set, combining them with **kwargs.
17 unmodified lines