Using these methods we can get an Object of type io. Response.getBody() : returns ResponseBody.Response interface contains two methods to get the Response Body When we request for the Weather details of a particular city, Server responds by sending the Weather details of the city as the Response Body. Let us continue with the example of Weather web service that we used in the previous tutorials. In this tutorial, we will learn about How to Read JSON Response Body using Rest Assured? and How to Validate Content of a Response Body? Read JSON Response Body using Rest Assured Validate Response Header using Rest-Assured.Validate Response Status code and Status Line using Rest-Assured.If you have not gone through the first two tutorials then I would suggest you go through these links We will continue with the same example in those tutorials and verify the body if the Response. In the last two tutorials we have learnt about Response Status Code, Status line and Headers.
0 Comments
Leave a Reply. |