Added Cookies documentation.
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 397bd4b · Browse files · 2 files·+14 added−8 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+14 added−8 removed
- other:+14 added−8 removed
Provenance
- Commit
98c8a78- Tree
baf85af- Author
Kenneth Reitz <me@kennethreitz.com>- Committer
Kenneth Reitz <me@kennethreitz.com>- Parent
397bd4b
2 files changed+14 added−8 removed
modified:requests/core.py+6 added-1 removed
286 unmodified lines287 """Sends a GET request. Returns :class:`Response` object.288 289 :param url: URL for the new :class:`Request` object.290 :param params: (optional) Dictionary of GET Parameters to send with the :class:`Request`.291- :param headers: (optional) Dictionary of HTTP Headers to sent with the :class:`Request`.291+ :param headers: (optional) Dictionary of HTTP Headers to send with the :class:`Request`.292+ :param cookies: (optional) CookieJar object to send with the :class:`Request`.293 :param auth: (optional) AuthObject to enable Basic HTTP Auth.294 """295 296 r = Request()15 unmodified lines312 313 :param url: URL for the new :class:`Request` object.314 :param params: (optional) Dictionary of GET Parameters to send with the :class:`Request`.315 :param headers: (optional) Dictionary of HTTP Headers to sent with the :class:`Request`.316+ :param cookies: (optional) CookieJar object to send with the :class:`Request`.317 :param auth: (optional) AuthObject to enable Basic HTTP Auth.318 """319 320 r = Request()17 unmodified lines338 :param url: URL for the new :class:`Request` object.339 :param data: (optional) Dictionary of POST Data to send with the :class:`Request`.340 :param headers: (optional) Dictionary of HTTP Headers to sent with the :class:`Request`.341 :param files: (optional) Dictionary of 'filename': file-like-objects for multipart encoding upload.342+ :param cookies: (optional) CookieJar object to send with the :class:`Request`.343 :param auth: (optional) AuthObject to enable Basic HTTP Auth.344 """345 346 r = Request()20 unmodified lines367 :param url: URL for the new :class:`Request` object.368 :param data: (optional) Bytes of PUT Data to send with the :class:`Request`.369 :param headers: (optional) Dictionary of HTTP Headers to sent with the :class:`Request`.370 :param files: (optional) Dictionary of 'filename': file-like-objects for multipart encoding upload.371+ :param cookies: (optional) CookieJar object to send with the :class:`Request`.372 :param auth: (optional) AuthObject to enable Basic HTTP Auth.373 """374 375 r = Request()16 unmodified lines392 393 :param url: URL for the new :class:`Request` object.394 :param params: (optional) Dictionary of GET Parameters to send with the :class:`Request`.395 :param headers: (optional) Dictionary of HTTP Headers to sent with the :class:`Request`.396+ :param cookies: (optional) CookieJar object to send with the :class:`Request`.397 :param auth: (optional) AuthObject to enable Basic HTTP Auth.398 """399 400 r = Request()63 unmodified linesmodified:README.rst+8 added-7 removed
54 unmodified lines55 56 **Requests:**57 58 All request functions return a Response object (see below).59+60+If a {filename: fileobject} dictionary is passed in (files=...), a multipart_encode upload will be performed.61+If CookieJar object is is passed in (cookies=...), the cookies will be sent with the request.62 63 GET Requests61- >>> request.get(url, params={}, headers={} auth=None)64+ >>> request.get(url, params={}, headers={}, cookies=None, auth=None)65 <request object>66 67 HEAD Requests65- >>> request.head(url, params={}, headers={} auth=None)68+ >>> request.head(url, params={}, headers={}, cookies=None, auth=None)69 <request object>70 71 PUT Requests69- >>> request.put(url, data='', headers={}, files={}, auth=None)72+ >>> request.put(url, data='', headers={}, files={}, cookies=None, auth=None)73 <request object>71- # If files dictionary ( {filename: fileobject, ...} ) is given, a multi-part upload is performed.74 75 POST Requests74- >>> request.post(url, data={}, headers={}, files={}, auth=None)76+ >>> request.post(url, data={}, headers={}, files={}, cookies=None, auth=None)77 <request object>76- # If files dictionary ( {filename: fileobject, ...} ) is given, a multi-part upload is performed.78 79 DELETE Requests79- >>> request.delete(url, params={}, headers={}, auth=None)80+ >>> request.delete(url, params={}, headers={}, cookies=None, auth=None)81 <request object>82 83 84 **Responses:**53 unmodified lines