fixes
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 5f603ae · Browse files · 2 files·+9 added−11 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+9 added−11 removed
- other:+9 added−11 removed
Provenance
- Commit
e0ae2b4- Tree
eac93c4- Author
Kenneth Reitz <me@kennethreitz.com>- Committer
Kenneth Reitz <me@kennethreitz.com>- Parent
5f603ae
2 files changed+9 added−11 removed
modified:requests/api.py+7 added-7 removed
31 unmodified lines32 :param url: URL for the new :class:`Request` object.33 :param params: (optional) Dictionary or bytes to be sent in the query string for the :class:`Request`.34 :param data: (optional) Dictionary or bytes to send in the body of the :class:`Request`.35 :param headers: (optional) Dictionary of HTTP Headers to send with the :class:`Request`.36- :param cookies: (optional) CookieJar object to send with the :class:`Request`.36+ :param cookies: (optional) Dict or CookieJar object to send with the :class:`Request`.37 :param files: (optional) Dictionary of 'filename': file-like-objects for multipart encoding upload.38 :param auth: (optional) AuthObject to enable Basic HTTP Auth.39 :param timeout: (optional) Float describing the timeout of the request.40 :param allow_redirects: (optional) Boolean. Set to True if POST/PUT/DELETE redirect following is allowed.45 unmodified lines86 87 :param url: URL for the new :class:`Request` object.88 :param params: (optional) Dictionary of parameters, or bytes, to be sent in the query string for the :class:`Request`.89 :param headers: (optional) Dictionary of HTTP Headers to send with the :class:`Request`.90- :param cookies: (optional) CookieJar object to send with the :class:`Request`.90+ :param cookies: (optional) Dict or CookieJar object to send with the :class:`Request`.91 :param auth: (optional) AuthObject to enable Basic HTTP Auth.92 :param timeout: (optional) Float describing the timeout of the request.93 :param proxies: (optional) Dictionary mapping protocol to the URL of the proxy.94 """7 unmodified lines102 103 :param url: URL for the new :class:`Request` object.104 :param params: (optional) Dictionary of parameters, or bytes, to be sent in the query string for the :class:`Request`.105 :param headers: (optional) Dictionary of HTTP Headers to sent with the :class:`Request`.106- :param cookies: (optional) CookieJar object to send with the :class:`Request`.106+ :param cookies: (optional) Dict or CookieJar object to send with the :class:`Request`.107 :param auth: (optional) AuthObject to enable Basic HTTP Auth.108 :param timeout: (optional) Float describing the timeout of the request.109 :param proxies: (optional) Dictionary mapping protocol to the URL of the proxy.110 """8 unmodified lines119 :param url: URL for the new :class:`Request` object.120 :param data: (optional) Dictionary or bytes to send in the body of the :class:`Request`.121 :param headers: (optional) Dictionary of HTTP Headers to sent with the :class:`Request`.122 :param files: (optional) Dictionary of 'filename': file-like-objects for multipart encoding upload.123- :param cookies: (optional) CookieJar object to send with the :class:`Request`.123+ :param cookies: (optional) Dict or CookieJar object to send with the :class:`Request`.124 :param auth: (optional) AuthObject to enable Basic HTTP Auth.125 :param timeout: (optional) Float describing the timeout of the request.126 :param allow_redirects: (optional) Boolean. Set to True if redirect following is allowed.127 :param params: (optional) Dictionary of parameters, or bytes, to be sent in the query string for the :class:`Request`.9 unmodified lines137 :param url: URL for the new :class:`Request` object.138 :param data: (optional) Dictionary or bytes to send in the body of the :class:`Request`.139 :param headers: (optional) Dictionary of HTTP Headers to sent with the :class:`Request`.140 :param files: (optional) Dictionary of 'filename': file-like-objects for multipart encoding upload.141- :param cookies: (optional) CookieJar object to send with the :class:`Request`.141+ :param cookies: (optional) Dict or CookieJar object to send with the :class:`Request`.142 :param auth: (optional) AuthObject to enable Basic HTTP Auth.143 :param timeout: (optional) Float describing the timeout of the request.144 :param allow_redirects: (optional) Boolean. Set to True if redirect following is allowed.145 :param params: (optional) Dictionary of parameters, or bytes, to be sent in the query string for the :class:`Request`.9 unmodified lines155 :param url: URL for the new :class:`Request` object.156 :param data: (optional) Dictionary or bytes to send in the body of the :class:`Request`.157 :param headers: (optional) Dictionary of HTTP Headers to sent with the :class:`Request`.158 :param files: (optional) Dictionary of 'filename': file-like-objects for multipart encoding upload.159- :param cookies: (optional) CookieJar object to send with the :class:`Request`.159+ :param cookies: (optional) Dict or CookieJar object to send with the :class:`Request`.160 :param auth: (optional) AuthObject to enable Basic HTTP Auth.161 :param timeout: (optional) Float describing the timeout of the request.162 :param allow_redirects: (optional) Boolean. Set to True if redirect following is allowed.163 :param params: (optional) Dictionary of parameters, or bytes, to be sent in the query string for the :class:`Request`.9 unmodified lines173 174 :param url: URL for the new :class:`Request` object.175 :param params: (optional) Dictionary of parameters, or bytes, to be sent in the query string for the :class:`Request`.176 :param headers: (optional) Dictionary of HTTP Headers to sent with the :class:`Request`.177- :param cookies: (optional) CookieJar object to send with the :class:`Request`.177+ :param cookies: (optional) Dict or CookieJar object to send with the :class:`Request`.178 :param auth: (optional) AuthObject to enable Basic HTTP Auth.179 :param timeout: (optional) Float describing the timeout of the request.180 :param allow_redirects: (optional) Boolean. Set to True if redirect following is allowed.181 :param proxies: (optional) Dictionary mapping protocol to the URL of the proxy.3 unmodified linesmodified:requests/models.py+2 added-4 removed
35 unmodified lines36 37 def __init__(self,38 url=None, headers=dict(), files=None, method=None, data=dict(),39 params=dict(), auth=None, cookiejar=None, timeout=None, redirect=False,40- allow_redirects=False, proxies=None, hooks=None):40+ allow_redirects=False, proxies=None):41 42 #: Float describ the timeout of the request.43 # (Use socket.setdefaulttimeout() as fallback)44 self.timeout = timeout48 unmodified lines93 94 #: True if Request has been sent.95 self.sent = False96 97- #: Dictionary of event hook callbacks.98- self.hooks = hooks97 100-98 # Header manipulation and defaults.99 100 if settings.accept_gzip:101 settings.base_headers.update({'Accept-Encoding': 'gzip'})298 unmodified lines400 #: up here.401 self.history = []402 #: The Request that created the Response.403 self.request = None404+ #: A dictionary of Cookies the server sent back.405 self.cookies = None406 407 408 def __repr__(self):202 unmodified lines