OpenWGA 7.9 - TMLScript reference

WGA » WGA.Call
Method :

addCookie(name, value)
addCookie(cookie)

On object WGA.Call
Usage

Adds a new cookie to the call, so it will be send to the client.
- DEPRECATED in 7.8.1 -

Description

Adds a new cookie to the call, so it will be send to the client.

This is a shortcut for calling createCookie(String, String) followed by addCookie(Cookie). The cookie is initialized according to what is documented on createCookie().

Note: This Method does not set the sameSite property of the cookie.

DEPRECATED in 7.8.1

Use Cookie.write() instead to send the Cookie (with sameSite property).

Parameters

Variant 1:

name (String)

The name of the cookie

value (String)

The Value of the cookie

Vaiant 2:

cookie (Cookie object)

A Cookie object to be added (typically retrieved via createCookie())

Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events