Forum Discussion
12 years ago
I have the exact same problem.
I'm trying to build a dynamic REST mockservice that needs to return a different response based on the JSON body of the POST request.
When I try to read the mockRequest.requestContent property it always returns null. The mockRequest object itself is not null, just the requestContent.
I am not running the script via the small green triangle ("Run this script"), I have tried posting a real request via SoapUI/curl/Chrome and I can see the JSON data posted in SoapUI's http log, but in the script the requestContent is still null.
Is this a bug or something I'm doing wrong?
Thanks!
I'm trying to build a dynamic REST mockservice that needs to return a different response based on the JSON body of the POST request.
When I try to read the mockRequest.requestContent property it always returns null. The mockRequest object itself is not null, just the requestContent.
I am not running the script via the small green triangle ("Run this script"), I have tried posting a real request via SoapUI/curl/Chrome and I can see the JSON data posted in SoapUI's http log, but in the script the requestContent is still null.
Is this a bug or something I'm doing wrong?
Thanks!