Skip to content
Myr

Use session defaults instead of arbitrary ones

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

authored by Ian Cordasco · committed by Ian Cordasco · parent 0cd23d8 · Browse files · 1 file+4 added−3 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+4 added−3 removed

  • other:+4 added−3 removed

1 file+4 added−3 removed

modified:requests/sessions.py+4 added-3 removed
429 unmodified lines
430 def send(self, request, **kwargs):431 """Send a given PreparedRequest."""432 # Set defaults that the hooks can utilize to ensure they always have433 # the correct parameters to reproduce the previous request.434 kwargs.setdefault('stream', False)435 kwargs.setdefault('verify', True)436 kwargs.setdefault('proxies', {})434 kwargs.setdefault('stream', self.stream)435 kwargs.setdefault('verify', self.verify)436 kwargs.setdefault('cert', self.cert)437 kwargs.setdefault('proxies', self.proxies438439 # It's possible that users might accidentally send a Request object.440 # Guard against that specific failure case.441 if getattr(request, 'prepare', None):
74 unmodified lines