Thank you Ajitabh.
I have a token and along with token cdata is also formed. Now i want to remove the CDATA section and want only token content. how i can do this in gatewayscript ?
<data contentType="application/x-www-form-urlencoded">
<![CDATA[token]]> </data>
------------------------------
Raja Kumar
------------------------------
Original Message:
Sent: Wed May 08, 2024 01:34 AM
From: Ajitabh Sharma
Subject: How to extract a variable from one gateway script policy to another
// In first Gw script do thisvar context = session.createContext("ctx-01");// Don't use URL based syntax. It will work but is not good herecontext.setVar("first-name", "Ajitabh");// In second Gw script do thisvar context = session.name("ctx-01");// Reading context variablesconsole.error("First log: %s",context.getVar("first-name"));
------------------------------
Ajitabh Sharma
Original Message:
Sent: Tue May 07, 2024 01:59 AM
From: Raja Kumar
Subject: How to extract a variable from one gateway script policy to another
Hello
I'm using 2 gatewayscript policies in my assembly flow. Now, when I try to extract the variable defined in gatewayscript policy 1. Its says that variable is undefined. can you please let me know how we can do this ?
Gatewayscript policy 1
let a = test;
Gatewayscript policy 2
//trying to print the variable value console.log('value of b is:', context.get('a'));
in apic logs, it prints as value of b is: a is undefined
P.S. I've tried context.set('') variable in gatewayscript policy 1 but still no luck.
------------------------------
Raja K
------------------------------