I am communicating with a web service that expects a POST parameter and also expect Request body. I have confirmed that such a POST request can be done using a REST Console
You could use the setQueryString
method to add the parameters to the URL that is being POSTed to. From a RESTful perspective I'd argue you should normally not be doing that, however, since a POST should represent a call to a resource and anything that would qualify for a query parameter should be included in the representation that is being transferred in the request body...or it should represent qualification of the resource itself in which case it should be part of the path that is posted to which could then be extracted by the controller using @PathVariable/@PathParam or something similar. So in your case you could also be looking for something like POST /MyRestWebService/files/test.txt
or more fittingly a PUT if you're saving the resource and know the URI. The code on the server could pull the filename out from a URL pattern.