Viewing or logging complete content of the incoming request to a REST MockService
Apologies for what's probably a very basic newbie question, but...
I'm using SoapUI to create a REST MockService, for the purpose of doing QA on a product I'm testing. The product feature I need to test is (of course) that under certain conditions, it sends a REST request to a designated host in a designated format, gets the response, and acts accordingly.
Now to verify that this product feature is sending the correct data in the correct format, I need a way to have the SoapUI REST MockService show the complete content of the request: the HTTP headers, their values, and of course the accompanying payload. But the Message Log in the REST MockService window shows only the time an incoming request was received, and the endpoint it was directed to. It does not show any of the actual request content. The content doesn't seem to be shown in any of the other application logs either (SoapUI log, http log, etc.).
I tried using the OnRequest Script window to write the request content to the script log, but I can't find any articles detailing the properties associated with the httpRequest object. The articles that would normally provide this information (see Section 2 of this page, https://www.soapui.org/docs/rest-testing-mocking/mock-service-scripting/) are dead links.
So bottom line, the question is: How can I view the complete content (headers, payload, all of it) of the incoming requests to a REST MockService?
After some searching I found two relevant answers in the above article.
1. If everything were working you would be able to display this information using the script command log.info mockRequest.requestContent
2. However not everything is working, this property returns null when processing a PUT request. This looks to be a very very old bug that is yet to be fixed (going back to 2014). But fortunately the same article's responses provide a workaround, a small block of script code that pulls the payload using a buffered reader object.