RESTResponseV2 : getCookies() method not working in Scoped application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2023 02:55 AM
Hi Team,
I am using instances with the Tokyo version.
Where I am writing code to call REST API which returns JSESSIONID in cookies. Below is an example:
var sm = new sn_ws.RESTMessageV2();
sm.setEndpoint(url);
sm.setHttpMethod(method);
var response = sm.execute();
var cookies= response.getCookies() // Getting exception at this point
- We are getting below exception while getting cookies.
JavaException: java.lang.RuntimeException: invalid return type: java.util.ArrayList
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2023 03:06 AM
"getCookies()" doesn't work in the scoped Application, Please check the suppot URL here,
For those who (if anyone) come across this issue, it's actually a problem and is currently being looked at by ServiceNow, Please check the relatable thread
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2023 09:15 PM
Hi @Prince Arora ,
Even it is not working ithe Global scope.
@Anuja Jadhav1, Did you get the solution to fix it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2023 08:55 PM
@Vikas Sakhare It worked for me in a global scope.