Forum Discussion
JHunt
5 years agoCommunity Hero
You can do this by setting up your own MockResult in the OnRequest script for the MockService.
if (mockRequest.httpRequest.method == 'PUT' && mockRequest.path == '/doMyUpdatePlease') {
mockRequest.httpResponse.setStatus(202, "") // empty Reason Phrase
return new com.eviware.soapui.impl.rest.mock.RestMockResult(mockRequest)
}
In this case, you don't need to add a MockResponse to your MockService as these requests will be handled completely by the script.