REST request.getRequestBody() & response.getQueryString() do not work on scripted REST

shayyoung1
Kilo Contributor

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);

7 REPLIES 7

shayyoung1
Kilo Contributor

I am executing this code on the workflow run script to call a REST message


Can you please post the screen shot of the flow.



Regards


Param


Capture.PNGCapture.PNG