Appearance
VM Code SDK v2 / Cookie
Interface: Cookie
Represents a browser cookie.
Example
ts
const cookie = {
name: "session_id",
value: "abc123",
domain: "example.com",
path: "/",
expires: 1672531199,
httpOnly: true,
secure: true,
sameSite: "Strict"
};Properties
domain
domain:
string
The domain for which the cookie is valid.
expires
expires:
number
The expiration date of the cookie in Unix time (seconds).
httpOnly
httpOnly:
boolean
Indicates if the cookie is HTTP only.
name
name:
string
The name of the cookie.
path
path:
string
The path for which the cookie is valid.
sameSite
sameSite:
"Strict"|"Lax"|"None"
The SameSite attribute of the cookie.
secure
secure:
boolean
Indicates if the cookie is secure.
value
value:
string
The value of the cookie.