Forum Discussion
2 Replies
Sort By
- nmraoChampion Level 3You should be able to use script or Events to do this.
Here is an example using script
https://github.com/nmrao/soapUIGroovyScripts/blob/master/groovy/SetHttpHeaders.groovy- vijayatammaNew Contributor
Hi
Thanks a lot for your reply.
I want to know how we can get the request headers that gets prepared( as they will be shown in the raw request) inside a Event handler and I am trying to get them like below but no success.
In the RequestFilter.filterRequest or RequestFilter.afterRequest I have tried the following statments
request.getRequestHeaders()
request.requestHeaders
context.testCase.testSteps['TestStepname'].httpRequest.requestHeaders
All the above are returning nothing.
Can you please let me know how to do inside the Event and which handler is the correct one to use ?
Thanks
Vijay
Related Content
- 5 years agoSiKing
- 4 years agojodydowling