Method HttpRequestMessage() :setCookie() Foundation

Sets the value of a cookie.

Syntax
 
:setCookie( <cName>, <cValue> ) --> self
:setCookie( <oCookie> ) --> self
Parameters
<cName>
A character string with the name of the cookie.
<cValue>
A character string with the value of the cookie.
<oCookie>
Instead of specifying the name and the value of the cookie via <cName> and <cValue>, a DataObject may be passed in the <oCookie> parameter. This object must have the members outlined in the table below. The values in these members will be used by :setCookie() for determining the cookie's name and value.
Required members of the DataObject in <oCookie>
Name Data Type Description
name C Name of the cookie
value C Value of the cookie
Return

:setCookie() returns the object executing the method.

Description

The method :setCookie() sets the value of a cookie. If the specified cookie is not defined, it is added to the cookie list. If the cookies is defined more than once (multiple values), all occurances are removed except one which has its value changed to <cValue>.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.