Forum Discussion

kolersa's avatar
kolersa
Contributor
9 years ago
Solved

ALWAYS GET NULL FROM REQUEST HEADER BY GROOVY

I try to get Cookie from request but always get null. I use groovy script def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context ) def httpRequestHeaders = testRunner.testCase.te...
  • nmrao's avatar
    9 years ago

    Try this below code in script assertion to request test step.


    Taking Accept-Encoding as example, but you may replace it with whatever property you wanted.

     

     

    def acceptedEncoding = messageExchange.requestHeaders['Accept-Encoding']
    log.info acceptedEncoding
    assert acceptedEncoding instanceof List