OpenWGA 7.9 - TMLScript reference

Cookie
Method :

getValue([decode])

On object Cookie
Usage Gets the value of a cookie and optionally decodes it.
Description

Since version 7.8.1 this method can be called with an optional decoder to decode the value

Possible decoders currently are

  • "hex" to convert the value from a hex string
  • "base64" to convert the value from a base64 string
Parameters

decode (String - optional)

Decodes the value with the specified decoder

Return value The (decoded) value of the cookie
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • Content type events
Examples
let cookie = WGA.Call.getCookie("my-cookie");
if(cookie)
console.log("cookie value", cookie.getValue("base64"))
else console.log("cookie not found");