I created a service callout (eg: myCallout
) which returns its response in a variable (eg: myCalloutResponse
). How can I access the body of the callout in a javascript policy?
I tried context.getVariable("myCallout.myCalloutResponse")
and a few others but couldn't get this to work.
Thanks
context.getVariable("myCalloutResponse.content") should give you the payload. Take a look at other variables available on response object - to extract the data you need.