Skip to content
Myr

defaults

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 c0faa9e · Browse files · 2 files+8 added−6 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+8 added−6 removed

  • other:+8 added−6 removed

2 files+8 added−6 removed

modified:requests/api.py+6 added-6 removed
34 unmodified lines
35 :param allow_redirects: (optional) Boolean. Set to True if POST/PUT/DELETE redirect following is allowed.36 """37 data = kwargs.pop('data', dict()) or kwargs.pop('params', dict())3839 r = Request(method=method, url=url, data=data, headers=kwargs.pop('headers', {}),40 cookiejar=kwargs.pop('cookies', None),41 files=kwargs.pop('files', None),42 auth=kwargs.pop('auth', auth_manager.get_auth(url)),43 timeout=kwargs.pop('timeout', config.settings.timeout),44 allow_redirects=kwargs.pop('allow_redirects', None)39 r = Request(method=method, url=url, data=data, headers=kwargs.pop('headers', dict()),40 cookiejar=kwargs.get('cookies', None),41 files=kwargs.get('files', None),42 auth=kwargs.get('auth', auth_manager.get_auth(url)),43 timeout=kwargs.get('timeout', config.settings.timeout),44 allow_redirects=kwargs.get('allow_redirects', None)45 )4647 r.send()48
73 unmodified lines
modified:requests/config.py+2 added
24 unmodified lines
25 r = self.__class__()2627 # cache previous settings for __exit__28 r.__cache = self.__dict__.copy()29 map(self.__cache.setdefault, self.__attrs__)3031 # set new settings32 self.__dict__.update(*args, **kwargs)33
6 unmodified lines
4041 def __exit__(self, *args):4243 # restore cached copy44 print '>>> {0}'.format(self.__cache)45 self.__dict__.update(self.__cache.copy())46 del self.__cache4748
9 unmodified lines