Forum Discussion

joeybear's avatar
joeybear
Contributor
15 years ago

Transferring Header Content - Is there a way?

I would like to transfer some of the headers content and transfer them to another test step. Is there a (soapUI built-in) way to do this?

I am using soapUI-Pro-3.5.1 on Mac OSX 10.6.4

Much thanks, in advance

2 Replies

  • Are you talking about reusing the Header content in from the Request or from the Response?
    I'm guessing you're looking for it from the Response - if so a simple groovy script should do this for you.
    For example:

    def headerValue = testRunner.testCase.testSteps["Request"].testRequest.response.responseHeaders["Server"]

    This will read a value from the header, in this case the Server. This can then be stored into a Property and reused in any way that you require.

    Hope that helps,
    Geoff