Link

Syntax

AddCookie(name, cookie)

Description

Use this method to add a Cookie object to the JSON Object.

Parameters

Name Description
name Specifies the name of the cookie that needs to be added as a string.
cookie Specifies the cookie to add to the JSON Object as a Cookie object.

Returns

None.

Example

Local Cookie &oCookie = %Response.CreateCookie("TheCookie");
&oCookie.Value = "TheCookieVal";
   
Local PSM_JSON:Object &oObject = create PSM_JSON:Object();
   
&oObject.AddCookie("MyCookie", &oCookie);