Forum Discussion

petran's avatar
petran
Frequent Visitor
5 years ago
Solved

Displaying HTTP Request headers from an incoming request in a REST mock server

I have created a REST Mock Service in soapUI. When the server processes the incoming REST-HTTP requests from my (test) application, I want to be able to view these incoming requests - all the HTTP he...
  • MartinSpamer's avatar
    5 years ago

    Mocks can be dynamic or static, they default to returning a static result, however you can control the response with groovy.

     

    Select the resource on the mock:

     

    Change SEQUENCE to SCRIPT to make it a dynamic mock.

    You can now edit the Groovy script, this is how the mock can provide different responses to different test requests. You can examine the content including headers with Groovy.

     

    You can read more at : https://www.soapui.org/soap-mocking/creating-dynamic-mockservices.html