Response from Postman



In the last tutorial we learnt about Get Request in Postman. In this tutorial we will understand how to deal with Response in Postman.

 

What is Response?

Response is a message that is received by the server in return to a Request that we send from postman. When we request something, server acts upon the Request and sends back a packet of requested information. Every request has a different kind of response and it is very important that we extract useful information from all of the response depends on our requirement. Postman has a beautiful interface for response and is very user friendly.

API request: http://restapi.demoqa.com/utilities/weather/city/Hyderabad

 

Understanding the Response

Response status code:

  • Status code should be “200 OK” . Status code 200 means, request is correct and desired response has been sent to Client.

Response Time:

Response time will be displayed in Milli seconds.Response Time is the duration which the response took after we sent the request and received the response.

Size:

Size is just the response size when it will be saved inside the memory. This response size is the size of complete response and headers and cookies and everything that has been sent along with the response.

Response Body:

body depicts the body of the response, which is the main response content, that has been sent from the server. In this case as you can see it is a web page code being sent to us as a response. Now, there lies three ways ahead of us to look at this response:

  • “City” value should be “Hyderabad”

{

“City”: “Hyderabad”,

“Temperature”: “20.38 Degree celsius”,

“Humidity”: “83 Percent”,

“WeatherDescription”: “mist”,

“WindSpeed”: “1.74 Km per hour”,

“WindDirectionDegree”: “108 Degree”

}

Cookies

Cookies are the small files which are related to the server files (website pages). Once you visit a website for the first time, a cookie is downloaded on the client’s machine. This cookie contains the information which can be used by the same website when you visit again. This helps the website to get you the specific response and specific information based on your last visit. In postman we can clearly see the cookies that have been sent from the server as a response. This makes it easy for the client to see what cookies are being saved inside his browser. We cannot manipulate this cookies since they are sent from server, Postman is used just to separate it from the response and have a clear view.

Cookies from Response

Headers

Headers in HTTP request is the addtional information sent to the Server from user.

Headers in HTTP response is the additional information received from Server.

Click on “Headers” tab to verify the headers information.

Response Headers

Once you click on header you can see different information such as below. Although, every entry in the Headers tab is a header item we will just take a look at the most important ones.

  • Content- Type : This is the content type of the response. 
  • Date : This option shows the date, day and time of the response along with the time zone.
  • Server : This option tells the name of the server which has responded to the request. In the above example, the server name is shown as nginx which corresponds to webserver where the weather webservice is running.  
  • Cookie expire time / Expires : As the name suggests, this option tells the expire time of the cookie that has been sent along with the response.

Tests:

Click on “Test Results” tab.

You can see the results of the tests that were run against the request.

Save Response:

Response can be “save as example” or  “Save to a file”.

Click on “Save Response” button

Click on “Save to a File” to save the response as file.

By default, file name shows as “response.json”.

Click on “Save” button to save as file. (response.json). so response will be saved as “response.json” file.

 

 

 

 

Tags:
1 Comment

Awesome post. I am a normal visitor of your site and appreciate you taking the time to maintain the nice site. I will be a regular visitor for a long time. Pauli Luke Emmet

Reply
Leave a comment

Your email address will not be published. Required fields are marked *

Subscribe now

Receive weekly newsletter with educational materials, new courses, most popular posts, popular books and much more!

https://bridgejunks.com/ https://crownmakesense.com/ https://brithaniabookjudges.com/ https://hughesroyality.com/ https://rhythmholic.com/ https://bandar89.simnasfikpunhas.com/ https://www.100calshop.co.il/products/thailand/ https://myasociados.com/ https://solyser.com/ http://konfidence.cz/ https://muscadinepdx.com/ https://bandar89.parajesandinos.com.ve/ https://goremekoop.com/ https://oncoswisscenter.com/ https://www.turunclifehotel.com/bandar89/ https://www.houseofproducts.biz/ https://taimoormphotography.com/
BIJI18 BIJI18 BIJI18