Skip to content
Myr

Merge branch 'develop' of https://github.com/chadnickbok/requests into develop

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 · parents f6ed16b, fc618aa · Browse files · 3 files+23 added−5 removed
This commit

State

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

Diff stats

3 files+23 added−5 removed

  • other:+23 added−5 removed

3 files+23 added−5 removed

modified:requests/api.py+1 added
31 unmodified lines
32 :param session: (optional) A :class:`Session` object to be used for the request.33 :param config: (optional) A configuration dictionary.34 :param verify: (optional) if ``True``, the SSL cert will be verified. A CA_BUNDLE path can also be provided.35 :param prefetch: (optional) if ``True``, the response content will be immediately downloaded.36 :param cert: (optional) if String, path to ssl client cert file (.pem). If Tuple, ('cert', 'key') pair.37 """3839 s = kwargs.pop('session') if 'session' in kwargs else sessions.session()40 return s.request(method=method, url=url, **kwargs)
77 unmodified lines
modified:requests/models.py+14 added-2 removed
61 unmodified lines
62 hooks=None,63 config=None,64 _poolmanager=None,65 verify=None,66 session=None):66 session=None,67 cert=None):6869 #: Dictionary of configurations for this request.70 self.config = dict(config or [])71
71 unmodified lines
143144 #: SSL Verification.145 self.verify = verify146147 #: SSL Certificate148 self.cert = cert149150 if headers:151 headers = CaseInsensitiveDict(self.headers)152 else:153 headers = CaseInsensitiveDict()
116 unmodified lines
270 timeout=self.timeout,271 _poolmanager=self._poolmanager,272 proxies=self.proxies,273 verify=self.verify,270 session=self.session274 session=self.session,275 cert=self.cert276 )277278 request.send()279 r = request.response
231 unmodified lines
511 else:512 conn.cert_reqs = 'CERT_NONE'513 conn.ca_certs = None514515 if self.cert:516 if type(self.cert) is tuple:517 conn.cert_file = self.cert[0]518 conn.key_file = self.cert[1]519 else:520 conn.cert_file = self.cert521522 if not self.sent or anyway:523524 if self.cookies:525
303 unmodified lines
modified:requests/sessions.py+8 added-3 removed
50 unmodified lines
51 """A Requests session."""5253 __attrs__ = [54 'headers', 'cookies', 'auth', 'timeout', 'proxies', 'hooks',55 'params', 'config', 'verify']55 'params', 'config', 'verify', 'cert']565758 def __init__(self,59 headers=None,
4 unmodified lines
64 hooks=None,65 params=None,66 config=None,67 prefetch=False,68 verify=True):68 verify=True,69 cert=None):7071 self.headers = headers or {}72 self.cookies = cookies or {}73 self.auth = auth
3 unmodified lines
77 self.params = params or {}78 self.config = config or {}79 self.prefetch = prefetch80 self.verify = verify81 self.cert = cert8283 for (k, v) in list(defaults.items()):84 self.config.setdefault(k, v)85
34 unmodified lines
120 hooks=None,121 return_response=True,122 config=None,123 prefetch=False,122 verify=None):124 verify=None,125 cert=None):126127 """Constructs and sends a :class:`Request <Request>`.128 Returns :class:`Response <Response>` object.129
11 unmodified lines
141 :param return_response: (optional) If False, an un-sent Request object will returned.142 :param config: (optional) A configuration dictionary.143 :param prefetch: (optional) if ``True``, the response content will be immediately downloaded.144 :param verify: (optional) if ``True``, the SSL cert will be verified. A CA_BUNDLE path can also be provided.145 :param cert: (optional) if String, path to ssl client cert file (.pem). If Tuple, ('cert', 'key') pair.146 """147148 method = str(method).upper()149
29 unmodified lines
179 allow_redirects=allow_redirects,180 proxies=proxies,181 config=config,182 verify=verify,183 cert=cert,184 _poolmanager=self.poolmanager185 )186187 # Merge local kwargs with session kwargs.
118 unmodified lines