Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Saving HTTP Response Code

bryancox Posts: 15

Hi Parasoft,

I am trying to figure out how to save response HTTP code (200, 500) and added a Header Data Bank output item, but I do see anything that looks it would be for the header code. . Here is what is returned:
HTTP/1.1 200
Content-Type: application/json;charset=UTF-8
Date: Thu, 01 Nov 2018 16:22:46 GMT
Vary: Accept-Encoding
X-TXN-ID: 6d046518-dc87-4dee-9252-5865143eabd6
Connection: Close

It is the HTTP/1.1 value I want to save off.

Thanks in advance,

Bryan Cox


  • Thomas Moore
    Thomas Moore Posts: 82 admin

    Hi Bryan,

    To do this, I would recommend adding in a Text Data Bank to the response header. There, you can create an extraction and define the left-hand text as "HTTP/1.1 " and the right-hand text as " " (make sure you include the space character with both). Once you do so and configure the column name, you should be able to access the response code in subsequent test steps.


    Hope this helps!

  • bryancox
    bryancox Posts: 15

    Hey Thomas,

    That worked.


  • amckernon
    amckernon Posts: 4

    I have the HTTP status code in the text data bank and see it in the console but am unclear how to actually validate that I got the response code I was expecting.

  • Matt Love
    Matt Love Posts: 93 admin

    You don't need a data bank if you just want to validate the response code you were expecting.
    Simply configure the Valid HTTP Response Codes field in the Misc tab of your REST Client or Messaging Client.