Skip to content
Myr

ch ch ch changes

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 2e391fa · Browse files · 1 file+10 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

1 file+10 added−5 removed

  • other:+10 added−5 removed

1 file+10 added−5 removed

modified:requests/models.py+10 added-5 removed
31 unmodified lines
3233 def __init__(self,34 url=None, headers=dict(), files=None, method=None, data=dict(),35 params=dict(), auth=None, cookies=None, timeout=None, redirect=False,36 allow_redirects=False, proxies=None, config=None, _pools=None):36 allow_redirects=False, proxies=None, config=None, hooks=None,37 _pools=None):3839 if cookies is None:40 cookies = {}414243 #: Float describ the timeout of the request.44 # (Use socket.setdefaulttimeout() as fallback)45 self.timeout = timeout46
62 unmodified lines
109 headers[k] = v110111 self.headers = headers112113 self.hooks = hooks114 self._pools = _pools115116 def __repr__(self):117 return '<Request [%s]>' % (self.method)
124 unmodified lines
242243 # Send her away!244 request.send()245 r = request.response240 self.cookies.update(r.cookies)246247 self.cookies.update(r.cookies or {})248249 # Insert collected history.250 r.history = history251252 # Attach Response to Request.
33 unmodified lines
286 body = encode_params(self.data)287 content_type = 'application/x-www-form-urlencoded'288289 # Setup cookies.283 elif self.cookies:284 pass290291 # Add content-type if it wasn't explicitly provided.292 if (content_type) and (not 'content-type' in self.headers):293 self.headers['Content-Type'] = content_type
53 unmodified lines
347 decode_content=False348 )349350 # Set the pools manager for redirections, if allowed.346 if self.config.get('keepalive') and pools:351 if self.config.get('keep_alive') and pools:352 self._pools = pools353354355 # except (urllib2.HTTPError, urllib2.URLError), why:
150 unmodified lines