Cookie is used to create cookies that have additional attributes
beyond their value.
Note that web browsers don't typically send any information with
the cookie other than its value. Therefore `HTTPRequest.cookie`
simply returns a value such as an integer or a string.
When the server sends cookies back to the browser, it can send
a cookie that simply has a value, or the cookie can be
accompanied by various attributes (domain, path, max-age, ...)
as described in `RFC 2109`_. Therefore, in HTTPResponse,
`setCookie` can take either an instance of the Cookie class,
as defined in this module, or a value.
Note that Cookies values get pickled (see the `pickle` module),
so you can set and get cookies that are integers, lists,
.. _`RFC 2109`: ftp://ftp.isi.edu/in-notes/rfc2109.txt
||Methods defined here:|
- __init__(self, name, value)
- Create a cookie.
Properties other than `name` and `value` are set with methods.
- Delete a cookie.
When sent, this should delete the cookie from the user's
browser, by making it empty, expiring it in the past,
and setting its max-age to 0. One of these will delete
the cookie for any browser (which one actually works
depends on the browser).
- Return header value.
Returns a string with the value that should be used
in the HTTP headers.
- setComment(self, comment)
- setDomain(self, domain)
- setExpires(self, expires)
- setMaxAge(self, maxAge)
- setPath(self, path)
- setSecure(self, secure=True)
- setValue(self, value)
- setVersion(self, version)
Data descriptors defined here:
- dictionary for instance variables (if defined)
- list of weak references to the object (if defined)