http.cookiejar.CookieJar

class http.cookiejar.CookieJar(policy=None) policy is an object implementing the CookiePolicy interface. The CookieJar class stores HTTP cookies. It extracts cookies from HTTP requests, and returns them in HTTP responses. CookieJar instances automatically expire contained cookies when necessary. Subclasses are also responsible for storing and retrieving cookies from a file or database.

http.cookiejar.Cookie.version

Cookie.version Integer or None. Netscape cookies have version 0. RFC 2965 and RFC 2109 cookies have a version cookie-attribute of 1. However, note that http.cookiejar may ‘downgrade’ RFC 2109 cookies to Netscape cookies, in which case version is 0.

http.cookiejar.Cookie.value

Cookie.value Cookie value (a string), or None.

http.cookiejar.Cookie.set_nonstandard_attr()

Cookie.set_nonstandard_attr(name, value) Set the value of the named cookie-attribute.

http.cookiejar.Cookie.secure

Cookie.secure True if cookie should only be returned over a secure connection.

http.cookiejar.Cookie.rfc2109

Cookie.rfc2109 True if this cookie was received as an RFC 2109 cookie (ie. the cookie arrived in a Set-Cookie header, and the value of the Version cookie-attribute in that header was 1). This attribute is provided because http.cookiejar may ‘downgrade’ RFC 2109 cookies to Netscape cookies, in which case version is 0.

http.cookiejar.Cookie.port_specified

Cookie.port_specified True if a port or set of ports was explicitly specified by the server (in the Set-Cookie / Set-Cookie2 header).

http.cookiejar.Cookie.port

Cookie.port String representing a port or a set of ports (eg. ‘80’, or ‘80,8080’), or None.

http.cookiejar.Cookie.path

Cookie.path Cookie path (a string, eg. '/acme/rocket_launchers').

http.cookiejar.Cookie.name

Cookie.name Cookie name (a string).