Struct Cookie
A cookie. Use Cookie("key", "value")
to create a cookie. You can chain methods.
auto cookie = Cookie("name", "value").path("/").domain("example.com").secure().maxAge(1.days);
output.setCookie(cookie);
Constructors
Name | Description |
this
(name, value)
|
Build a cookie with name and value
|
Properties
Name | Type | Description |
domain [set]
|
Cookie | Set cookie domain
|
expire [set]
|
Cookie | Set cookie expire time. It overrides maxAge.
|
httpOnly [set]
|
Cookie | Set cookie httpOnly flag. This cookie will not be accessible from javascript.
|
invalidate [get]
|
Cookie | Invalidate cookie. It will be deleted from browser on output.setCookie() request.
|
maxAge [set]
|
Cookie | Set cookie max age. It overrides expire.
|
path [set]
|
Cookie | Set cookie path
|
sameSite [set]
|
Cookie | Set cookie SameSite flag
|
secure [set]
|
Cookie | Set cookie secure flag. This cookie will be sent only thru https.
|
Enums
Name | Description |
SameSite
|
Cookie SameSite flag
|