Skip to main content

Type Alias: Cookie

Cookie = object

Defined in: core/src/lib/Types.ts:237

A single cookie entry in a Cookies list. The name and value field is mandatory. It is better to also specify the domain field, otherwise MemLab will try to infer domain automatically. The other fields are optional. For concrete use case, please check out cookies.

Properties

domain?

optional domain?: string

Defined in: core/src/lib/Types.ts:243

Optional: Defines the domain associated with the cookie


expires?

optional expires?: Undefinable\<number>

Defined in: core/src/lib/Types.ts:252

Optional: Indicates when the cookie will expire, in Unix time (seconds)


httpOnly?

optional httpOnly?: Undefinable\<boolean>

Defined in: core/src/lib/Types.ts:254

Optional: Flag to determine if the cookie is accessible only over HTTP


name

name: string

Defined in: core/src/lib/Types.ts:239

Mandatory: Represents the name of the cookie


path?

optional path?: Undefinable\<string>

Defined in: core/src/lib/Types.ts:250

Optional: Defines the path associated with the cookie


sameSite?

optional sameSite?: Undefinable\<"Strict" | "Lax">

Defined in: core/src/lib/Types.ts:266

Optional: Determines if a cookie is transmitted with cross-site requests, offering a degree of defense against cross-site request forgery attacks.


secure?

optional secure?: Undefinable\<boolean>

Defined in: core/src/lib/Types.ts:261

Optional: Flag to indicate if the cookie transmission requires a secure protocol (e.g., HTTPS).


session?

optional session?: Undefinable\<boolean>

Defined in: core/src/lib/Types.ts:256

Optional: Flag to check if the cookie is a session cookie


url?

optional url?: Undefinable\<string>

Defined in: core/src/lib/Types.ts:248

Optional: Specifies the request-URI linked with the cookie setup. This can influence the cookie's default domain and path.


value

value: string

Defined in: core/src/lib/Types.ts:241

Mandatory: Represents the value assigned to the cookie