requests.cookies ~~~~~~~~~~~~~~~~ Compatibility code to be able to use `cookielib.CookieJar` with requests. requests.utils imports from here, so be careful with imports.
Class |
|
Wraps a `requests.Request` to mimic a `urllib2.Request`. |
Class |
|
Wraps a `httplib.HTTPMessage` to mimic a `urllib.addinfourl`. |
Class |
|
Compatibility class; is a cookielib.CookieJar, but exposes a dict interface. |
Exception |
|
There are two cookies that meet the criteria specified in the cookie jar. Use .get and .set and include domain and path args in order to be more specific. |
Function | cookiejar |
Returns a CookieJar from a key/value dictionary. |
Function | create |
Make a cookie from underspecified parameters. |
Function | extract |
Extract the cookies from the response into a CookieJar. |
Function | get |
Produce an appropriate Cookie header string to be sent with `request`, or None. |
Function | merge |
Add cookies to cookiejar and returns a merged CookieJar. |
Function | morsel |
Convert a Morsel object into a Cookie containing the one k/v pair. |
Function | remove |
Unsets a cookie by name, by default over all domains and paths. |
Function | _copy |
Undocumented |
Returns a CookieJar from a key/value dictionary. :param cookie_dict: Dict of key/values to insert into CookieJar. :param cookiejar: (optional) A cookiejar to add the cookies to. :param overwrite: (optional) If False, will not replace cookies already in the jar with new ones. :rtype: CookieJar
Make a cookie from underspecified parameters. By default, the pair of `name` and `value` will be set for the domain '' and sent on every request (this is sometimes called a "supercookie").
Extract the cookies from the response into a CookieJar. :param jar: cookielib.CookieJar (not necessarily a RequestsCookieJar) :param request: our own requests.Request object :param response: urllib3.HTTPResponse object
Add cookies to cookiejar and returns a merged CookieJar. :param cookiejar: CookieJar object to add the cookies to. :param cookies: Dictionary or CookieJar object to be added. :rtype: CookieJar