Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
interface Protocol.Network.SetCookieRequest
import { type Protocol } from "https://deno.land/x/puppeteer@14.1.1/vendor/puppeteer-core/puppeteer/api-docs-entry.d.ts";
const { SetCookieRequest } = Protocol.Network;

Properties

name: string

Cookie name.

value: string

Cookie value.

optional
url: string

The request-URI to associate with the setting of the cookie. This value can affect the default domain, path, source port, and source scheme values of the created cookie.

optional
domain: string

Cookie domain.

optional
path: string

Cookie path.

optional
secure: boolean

True if cookie is secure.

optional
httpOnly: boolean

True if cookie is http-only.

optional
sameSite: CookieSameSite

Cookie SameSite type.

optional
expires: TimeSinceEpoch

Cookie expiration date, session cookie if not set

optional
priority: CookiePriority

Cookie Priority type.

optional
sameParty: boolean

True if cookie is SameParty.

optional
sourceScheme: CookieSourceScheme

Cookie source scheme type.

optional
sourcePort: integer

Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.

optional
partitionKey: string

Cookie partition key. The site of the top-level URL the browser was visiting at the start of the request to the endpoint that set the cookie. If not set, the cookie will be set as not partitioned.