Cookie

import type {Cookie} from 'cabbie-async';

Cookies are represented by plain objects of this type. You can set/get them using the CookieStorage object.

Properties

name: string

The name/key of the cookie.

value: string

The cookie's value.

path: string

The cookie path. If you provide this, it scopes the cookie to the given path. By default, this is set to "/"

domain: string

The domain the cookie is visible to. If you don't provide this, it defaults to the domain that is currently loaded in the active window.

httpOnly: boolean

Whether the cookie is an httpOnly cookie. If this is set to true, the cookie is not visible to JavaScript.

secure: boolean

Whether the cookie is a secure cookie. If this is set to true, the cookie is only available over https connections

expiry: number

When the cookie expires, specified in seconds since midnight, January 1, 1970 UTC. If this is not provided, the cookie never expires.