Forum Discussion
KarelHusa
3 years agoChampion Level 2
Hi MaxRybalkin91 ,
this seems to be an old bug of PUT operation in REST mocks.
It was already discussed here: https://community.smartbear.com/t5/ReadyAPI-Questions/Mock-Service-mockRequest-requestContent-is-NULL-HTTP-PUT/td-p/42138 .
And the thread suggests a workaround (not nice, but working):
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()
Best regards,
Karel
Related Content
- 12 months ago
- 7 years ago