Class: Cookie

helma.Http.Cookie(name, value)

Instances of this object represent a HTTP cookie

Constructor

Creates a new instance of helma.Http.Cookie
Parameters:
Name Type Description
name String The name of the cookie
value String The value of the cookie
Source:
Returns:
A newly created Cookie instance

Members

domain :String

An optional domain where this cookie is valid
Type:
  • String
Source:

expires :Date

An optional date defining the lifetime of this cookie
Type:
  • Date
Source:

name :String

The name of the Cookie
Type:
  • String
Source:

path :String

An optional path where this cookie is valid
Type:
  • String
Source:

value :String

The value of the Cookie
Type:
  • String
Source:

(static, readonly) DATEFORMAT :java.text.SimpleDateFormat

An instance of java.text.SimpleDateFormat used for both parsing an "expires" string into a date and vice versa
Type:
  • java.text.SimpleDateFormat
Source:

(static, readonly) PATTERN :RegExp

A regular expression used for parsing cookie strings
Type:
  • RegExp
Source:

Methods

getFieldValue()

Returns this cookie in a format useable to set the HTTP header field "Cookie"
Source:
Returns:
This cookie formatted as HTTP header field value

(static) parse(cookieStr)

Parses the cookie string passed as argument into an instance of helma.Http
Parameters:
Name Type Description
cookieStr String The cookie string as received from the remote server
Source:
Returns:
An instance of helma.Http.Cookie containing the cookie parameters