Skip to main content
Access via:io.cookies

Cookies API.

3 Methods

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>

Removes a cookie with the specified URL and name.

Parameters (2)

Name Type Required Description
url⚓︎ string

URL of the cookie to remove.

name⚓︎ string

Name of the cookie to remove.

set()⚓︎

(cookie: CookiesSetDetails) => Promise<void>

Sets a cookie or modifies an existing one with the specified values.

Parameters (1)

Name Type Required Description