
BBjHttpResponse::addCookie
Description
In BBj 12.0 and higher, this method returns a new BBjCookie object with the name set.
Syntax
Return Value |
Method |
addCookie(string name) |
Parameters
Variable |
Description |
name |
Specifies the name of the cookie. |
Return Value
a new BBjCookie object with the name set.
Remarks
The example below shows how to add a new cookie through the BBjHttpResponse object. Note that you must execute the cookie's BBjCookie::setValue(String) and BBjCookie::setMaxAge(int) methods in order to successfully create the cookie.
Example
REM
Obtain the instance of the BBjAPI object |