Forum Discussion
I have the same issue with SoapUI 5.2.1 when I try to read the content of a PUT message.
Has this bug been fixed in any SOAP UI release ? Or is there a workaround for this issue ?
- kjdivya8 years agoOccasional Contributor
Hi
i found one workaround for the problem. We are getting null output for mockRequest.getRequestContent() for PUT request
The workaround would be to use the following code
InputStream is = mockRequest.request.inputStream
BufferedReader br = new BufferedReader(new InputStreamReader(is, "UTF-8"));
StringBuilder sb = new StringBuilder()
while((s=br.readLine())!=null) {
sb.append(s)
}
String payLoad = sb.toString()
log.info payLoad- vikititor6 years agoContributor
NOT WORKS. I am using the ReadyAPI v 2.8.
I am unable to read request body.. So unable to return valid response to my Application under test = I am unable to test it = unable to use this tool for testing.
This topic is here sooo loooong.. And no solution? I am surprised. So nobody from SmartBear was working on it? It means, that we are paing for licenses, but no effect?
Please can somebody tell me, how to read POST body request ? because I must return some string value from it back to AUT..
- NBorovykh6 years agoModerator
HI vikititor,
In the Dispatch script, a request content can be retrieved as follows:
mockRequest.getRequestContent()
In the latest ReadyAPI version it works for POST, PUT and the other supported HTTP methods.
Please check the screenshot:
Please double-check your configuration and if it still does not work for you as expected, submit a new support case: https://support.smartbear.com/message/?prod=ReadyAPI
- viswam_i9 years agoNew Contributor
Anyone got the solution for this? Even I am seeing the same issue
- viswam_i9 years agoNew Contributor
Can anyone please suggest in which version this issue is resolved?
Related Content
- 7 years ago
- 2 years ago
Recent Discussions
- 4 days ago