Object - http : Cookie

Represents a Cookie.

Constructor

__init

(string name, string value)

  • name string
  • value string

Methods

Fields

  • name string? (default ())
  • Name of the cookie

  • value string? (default ())
  • Value of the cookie

  • domain string? (default ())
  • Host to which the cookie will be sent

  • path string? (default ())
  • URI path to which the cookie belongs

  • expires string? (default ())
  • Maximum lifetime of the cookie represented as the date and time at which the cookie expires

  • maxAge int (default 0)
  • Maximum lifetime of the cookie represented as the number of seconds until the cookie expires

  • httpOnly boolean (default false)
  • Cookie is sent only to HTTP requests

  • secure boolean (default false)
  • Cookie is sent only to secure channels

  • creationTime Time (default time:currentTime())
  • Creation time of the cookie

  • lastAccessedTime Time (default time:currentTime())
  • Last-accessed time of the cookie

  • hostOnly boolean (default false)
  • Cookie is sent only to the requested host

isPersistent

()

returns boolean

  • Return Type

    (boolean)

isValid

()

returns boolean | error

  • Return Type

    (boolean | error)