Skip to content
Myr

Merge pull request #941 from Lukasa/issue870

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

Update documentation on Sessions.

authored by Kenneth Reitz · committed by Kenneth Reitz · parents dea8e96, 0792acc · Browse files · 2 files+30 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

2 files+30 added−0 removed

  • other:+30 added−0 removed

2 files+30 added−0 removed

modified:docs/api.rst+3 added
36 unmodified lines
37-----------------3839.. autofunction:: session4041.. autoclass:: Session42 :inherited-members:43444546Exceptions47~~~~~~~~~~4849.. module:: requests
98 unmodified lines
modified:requests/sessions.py+27 added
71 unmodified lines
72 prefetch=True,73 verify=True,74 cert=None):7576 #: A case-insensitive dictionary of headers to be sent on each77 #: :class:`Request <Request>` sent from this78 #: :class:`Session <Session>`.79 self.headers = from_key_val_list(headers or [])8081 #: Authentication tuple or object to attach to82 #: :class:`Request <Request>`.83 self.auth = auth8485 #: Float describing the timeout of the each :class:`Request <Request>`.86 self.timeout = timeout8788 #: Dictionary mapping protocol to the URL of the proxy (e.g.89 #: {'http': 'foo.bar:3128'}) to be used on each90 #: :class:`Request <Request>`.91 self.proxies = from_key_val_list(proxies or [])9293 #: Event-handling hooks.94 self.hooks = from_key_val_list(hooks or {})9596 #: Dictionary of querystring data to attach to each97 #: :class:`Request <Request>`. The dictionary values may be lists for98 #: representing multivalued query parameters.99 self.params = from_key_val_list(params or [])100101 #: Dictionary of configuration parameters for this102 #: :class:`Session <Session>`.103 self.config = from_key_val_list(config or {})104105 #: Prefetch response content.106 self.prefetch = prefetch107108 #: SSL Verification.109 self.verify = verify110111 #: SSL certificate.112 self.cert = cert113114 for (k, v) in list(defaults.items()):115 self.config.setdefault(k, deepcopy(v))
240 unmodified lines