Network.setCookie
Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
{
"name": "setCookie",
"parameters": [
{
"name": "name",
"type": "string",
"description": "Cookie name."
},
{
"name": "value",
"type": "string",
"description": "Cookie value."
},
{
"name": "url",
"type": "string",
"optional": true,
"description": "The request-URI to associate with the setting of the cookie. This value can affect the default domain and path values of the created cookie."
},
{
"name": "domain",
"type": "string",
"optional": true,
"description": "Cookie domain."
},
{
"name": "path",
"type": "string",
"optional": true,
"description": "Cookie path."
},
{
"name": "secure",
"type": "boolean",
"optional": true,
"description": "True if cookie is secure."
},
{
"name": "httpOnly",
"type": "boolean",
"optional": true,
"description": "True if cookie is http-only."
},
{
"name": "sameSite",
"$ref": "CookieSameSite",
"optional": true,
"description": "Cookie SameSite type."
},
{
"name": "expires",
"$ref": "TimeSinceEpoch",
"optional": true,
"description": "Cookie expiration date, session cookie if not set"
}
],
"returns": [
{
"name": "success",
"type": "boolean",
"description": "True if successfully set cookie."
}
],
"description": "Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist."
}