Access via:
io.cookiesAPIinterface
Cookies API.
4 Methods
copy()⚓︎
(options: CopyCookiesOptions) => Promise<void>
Copies the cookies for the specified domains, including HttpOnly ones, from one session to another.
Overwrites the values of any matching cookies with the same name, domain, and path in the target destination regardless of which value is newer.
Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| options⚓︎ | CopyCookiesOptions | Options for copying cookies from one session to another. |
get()⚓︎
(filter?: CookiesGetFilter) => Promise<Cookie[]>
Retrieves a list of cookies matching an optional filter object. If no filter is specified, will return all cookies.
Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| filter⚓︎ | CookiesGetFilter | x | Filter object that will be matched against all cookies. Only the cookies whose properties match the properties specified in the filter object will be returned. |
remove()⚓︎
(url: string, name: string) => Promise<void>
set()⚓︎
(cookie: CookiesSetDetails) => Promise<void>
Sets a cookie or modifies an existing one with the specified values.
Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| cookie⚓︎ | CookiesSetDetails | Specifies which properties of the cookie to set. |