Description
When getCookies() API is called from a scope application, it fails.
Steps to Reproduce
-
Create a RestMessageV2 or SOAPMessageV2 and execute it in a scoped application.
-
On the response object, try to retrieve the cookies by calling the getCookies() function.
The function will fail out of scope.
For example, the following script will work on a global scope but it fails on an scoped application:
function(e, d) { var a = new sn_ws.RESTMessageV2; a.setHttpMethod("get"); a.setEndpoint("<end-point>"); a = a.execute().getCookies(); gs.info(a); for (var c = [], b = 0; b < a.size(); b++) c.push(a.get(b)); d.setBody(c) })(request, response);
Workaround
Move the REST/SOAP operations to a global application.
Related Problem: PRB732515