logo

class

web::Cookie

sys::Obj
  web::Cookie

Cookie models an HTTP cookie used to pass data between the server and brower as defined by RFC 2965 and RFC 2109. See WebReq.cookies and WebRes.cookies.

Slots

comment

Str comment

Provided to allow users to organize their cookies. Defaults to null.

Source

domain

Str domain

Specifies the domain for which the cookie is valid. An explicit domain must always start with a dot. If null (the default) then the cookie only applies to the server which set it.

Source

fromStr

static Cookie fromStr(Str s)

Parse a HTTP cookie header name/value pair. Throw ParseErr if not formatted correctly.

Source

maxAge

Duration maxAge

Defines the lifetime of the cookie, after the the max-age elapses the client should discard the cookie. The duration is floored to seconds (fractional seconds are truncated). If maxAge is null (the default) then the cookie persists until the client is shutdown. If zero is specified, the cookie is discarded immediately.

Source

name

Str name

Name of the cookie. Names must be HTTP tokens and never start with $.

Source

path

Str path := "/"

Specifies the subset of URLs to which the cookie applies. If set to "/" (the default), then the cookie applies to all paths. If the path is null, it as assumed to be the same path as the document being described by the header which contains the cookie.

Source

secure

Bool secure := false

If true, then the client only sends this cookie using a secure protocol such as HTTPS. Defaults to false.

Source

toStr

override Str toStr()

Return the cookie formatted as an HTTP header.

Source

value

Str value

Value string of the cookie.

Source

version

Str version := "1"

Specified which version of HTTP statement management is being used. Default is "1".

Source