Forum Discussion

ballbuster's avatar
ballbuster
Occasional Contributor
17 years ago

[RESOLVED] HTTP response code

Does SoapUI offer a way to get at the HTTP response code? I am sending XML in REST requests to a webservice. In the SoapUI Response section, when you click on Raw, you can see the HTTP header response. I want to take the response code 'e.g.: 200' and assign it to a variable. I cannot find a way of doing this. Any help is appreciated.

2 Replies

  • Hi,

    you can use  assertions->"script  assertion" at the bottom of 'REST Test Request"
    In script editor you can use messageExchange variable to fetch response status code ( ie  messageExchange.getResponseStatusCode() ) .

    Let us know if it helps
    Regards
    Nebojsa