Forum Discussion
tsui
10 years agoNew Contributor
Hi Tanya,
I am afraid that this example does not solve my problem.
The request is sent from a outside server, so I don't have access to the request.
I just need to get this request and modify the content-type to "gzip" before that is read by my mock.
I'm looking for a solution, can someone help me with this issue please?
Thanks
TanyaYatskovska
Alumni
10 years agoHi Tsui,
I’ve found the following sample Groovy script:
def tstep = testRunner.testCase.getTestStepByName("REST http call") tstep.testRequest.setMediaType('application/json')
Give it a try (specify your content-type) and let me know how it works for you.