REST request.getRequestBody() & response.getQueryString() do not work on scripted REST
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2017 05:32 AM
Hi,
I cannot get this to work at all.
any help would be appreciated
response = sm.executeAsync(); //Might throw exception if http connection timed out or some issue with sending request itself because of encryption/decryption of password.
response.waitForResponse(60);// In seconds. Wait at most 60 seconds to get response from ECC Queue/Mid Server //Might throw exception timing out waiting for response in ECC queue.
responseBody = response.haveError() ? response.getErrorMessage() : response.getBody();
status = response.getStatusCode();
}
catch(ex)
{
responseBody = ex.getMessage();
status = '500';
}
finally
{
requestBody = sm ? sm.getRequestBody():null;
}
workflow.info("Request Body: " + requestBody);
workflow.info("Request Body: " + response.getQueryString());
workflow.info("Response: " + responseBody);
workflow.info("HTTP Status: " + status);
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2017 04:06 AM
I am executing this code on the workflow run script to call a REST message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2017 06:02 AM
Can you please post the screen shot of the flow.
Regards
Param
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2017 06:23 AM