Skip to main content
Version: Next

SessionCookie

Cookie shape used by CookieJar. Structurally compatible with tough-cookie's Cookie class, so a tough-cookie cookie satisfies it without @crawlee/types depending on tough-cookie itself.

Index

Properties

creation

creation: null | Date | Infinity

creationIndex

creationIndex: number

domain

domain: null | string

expires

expires: null | Date | Infinity

extensions

extensions: null | string[]

hostOnly

hostOnly: null | boolean

httpOnly

httpOnly: boolean

key

key: string

lastAccessed

lastAccessed: null | Date | Infinity

maxAge

maxAge: null | number | Infinity | -Infinity

path

path: null | string

pathIsDefault

pathIsDefault: null | boolean

sameSite

sameSite: undefined | string

secure

secure: boolean

value

value: string

Methods

canonicalizedDomain

  • canonicalizedDomain(): undefined | string
  • Returns undefined | string

cdomain

  • cdomain(): undefined | string
  • Returns undefined | string

clone

cookieString

  • cookieString(): string
  • Returns string

expiryDate

  • expiryDate(now): undefined | Date
  • Parameters

    • optionalnow: Date

    Returns undefined | Date

expiryTime

  • expiryTime(now): undefined | number
  • Parameters

    • optionalnow: Date

    Returns undefined | number

isPersistent

  • isPersistent(): boolean
  • Returns boolean

setExpires

  • setExpires(exp): void
  • Parameters

    • exp: string | Date

    Returns void

setMaxAge

  • setMaxAge(age): void
  • Parameters

    • age: number

    Returns void

toJSON

  • toJSON(): Record<string, unknown>
  • Returns Record<string, unknown>

toString

  • toString(): string
  • Returns string

TTL

  • TTL(now): number
  • Parameters

    • optionalnow: number

    Returns number

validate

  • validate(): boolean
  • Returns boolean