Skip to main content

CookieStore

Read/write/delete cookies. Every method may be synchronous or return a promise, so request/response cookie APIs that are async (e.g. next/headers cookies()) work without ceremony.

Extended by​

Properties​

PropertyTypeDescription
delete(name, options?) => void | Promise<void>Delete a cookie. Must be given the same path/domain the cookie was written with, or the deletion won't match it.
get(name) => string | Promise<string | undefined> | undefinedRead a cookie value.
set(name, value, options?) => void | Promise<void>Write a cookie.