See also CookieManager.SetCookie(), CookieVisitor.Visit() and ResourceHandler.CanGetCookie / CanSetCookie.
Table of contents:
Parameter | Type |
---|---|
cookie | dict |
Return | void |
Set cookie properties via a dict.
The cookie may have the following keys:
- name (str)
- value (str)
- domain (str)
- path (str)
- secure (bool)
- httpOnly (bool)
- creation (datetime.datetime)
- lastAccess (datetime.datetime)
- hasExpires (bool)
- expires (datetime.datetime)
Return | dict |
Get all cookie properties as a dict.
Parameter | Type |
---|---|
name | string |
Return | void |
Set the cookie name.
Return | string |
Get the cookie name.
Parameter | Type |
---|---|
value | string |
Return | void |
Set the cookie value.
Return | string |
Get the cookie value.
Parameter | Type |
---|---|
domain | string |
Return | void |
If |domain| is empty a host cookie will be
created instead of a domain cookie. Domain cookies are stored with a
leading "." and are visible to sub-domains whereas host cookies are
not.
Return | string |
Get the cookie domain.
Parameter | Type |
---|---|
path | string |
Return | void |
If |path| is non-empty only URLs at or below the path will get the
cookie value.
Return | string |
Get the cookie path.
Parameter | Type |
---|---|
secure | bool |
Return | void |
If |secure| is true the cookie will only be sent for HTTPS requests.
Return | bool |
Get the secure property.
Parameter | Type |
---|---|
httpOnly | bool |
Return | void |
If |httponly| is true the cookie will only be sent for HTTP requests.
Return | bool |
Get the httpOnly property.
Parameter | Type |
---|---|
creation | datetime.datetime |
Return | void |
The cookie creation date. This is automatically populated by the system on
cookie creation.
Return | datetime.datetime |
Get the creation property.
Parameter | Type |
---|---|
lastAccess | datetime.datetime |
Return | void |
The cookie last access date. This is automatically populated by the system
on access.
Return | datetime.datetime |
Get the lastAccess property.
Parameter | Type |
---|---|
hasExpires | bool |
Return | void |
The cookie expiration date is only valid if |hasExpires| is true.
Return | bool |
Get the hasExpires property.
Parameter | Type |
---|---|
expires | datetime.datetime |
Return | void |
Set the cookie expiration date. You should also call SetHasExpires().
Return | datetime.datetime |
Get the expires property.