Http Get Response Body (http:get-response-body)

Http Get Response Body (http:get-response-body)

In cast we can get the response body for latest HTTP call by using http:get-response-body tag. Response body will be saved in the given name variable





Released In

2.2.20-GA

Usage:

<http:get-response-body name=""! >

! - mandatory





Examples



Example

Behaviour

Example

Behaviour



<test-step xray:stepDescription="GIVEN a valid url WHEN I make a GET call And Get Response Body" xray:stepData="" xray:stepExpectedResult=""> <http:call method="get" url="https://testifi.free.beeceptor.com/cia?accountid=f18d489e-be2c-4a6d-8213-ba2219192f41"> <http:get-response-body name="localResponseBody" /> </http:call> </test-step> <test-step xray:stepDescription="Then I verify that response body" xray:stepData="" xray:stepExpectedResult=""> <assert method="contains" comparedValue="${localResponseBody}" actualValue="f18d489e-be2c-4a6d-8213-ba2219192f41"/> </test-step>







Makes a get API call to endpoint and saves response body in "localResponseBody" variable