Class Cookie
class Cookie
;
Properties
Name | Type | Description |
---|---|---|
domain [get, set]
|
string | The domain for which the cookie is valid |
expires [get, set]
|
string | Expiration date of the cookie |
httpOnly [get, set]
|
bool | Prevents access to the cookie from scripts. |
maxAge [get, set]
|
long | Maximum life time of the cookie |
path [get, set]
|
string | The path/local URI for which the cookie is valid |
rawValue [get, set]
|
string | Undecoded cookie payload |
sameSite [get, set]
|
Cookie | Prevent cross-site request forgery. |
secure [get, set]
|
bool | Require a secure connection for transmission of this cookie |
value [get, set]
|
string | Cookie payload |
Methods
Name | Description |
---|---|
expire
(max_age)
|
Sets the "expires" and "max-age" attributes to limit the life time of the cookie. |
setValue
(value, encoding)
|
Sets the cookie value encoded with the specified encoding. |
writeString
(dst, name)
|
Writes out the full cookie in HTTP compatible format. |
Enums
Name | Description |
---|---|
Encoding
|
|
SameSite
|