Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2024 01:06 AM - edited 11-15-2024 01:08 AM
var body = {
"short_description": "test",
"caller_id":"Abel Tuter",
"description":"testing integration"
};
var abc = JSON.stringify(body);
var power_request = new sn_ws.RESTMessageV2('TestInstance', 'Default Post');
power_request.setStringParameterNoEscape('baseURL', '*********************************');
power_request.setRequestHeader("Accept","application/json");
power_request.setRequestHeader("Content-Type","application/json");
power_request.setrequestBody(abc);
var response = power_request.execute();
var xyz = power_request.getRequestBody();
gs.log("the body of rest is "+xyz);
they are not getting the body that I am intended to sent to them and even when I tired to print the request body after executing the request through the log its not printing anything just I am getting "the body of rest is"
where i did wrong and what is making this not to happen?
they are not getting the body that I am intended to sent to them and even when I tired to print the request body after executing the request through the log its not printing anything just I am getting "the body of rest is"
where i did wrong and what is making this not to happen?
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2024 02:10 AM - edited 11-15-2024 02:10 AM
Try changing
power_request.setrequestBody(abc);
To
power_request.setRequestBody(abc);
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2024 02:10 AM - edited 11-15-2024 02:10 AM
Try changing
power_request.setrequestBody(abc);
To
power_request.setRequestBody(abc);