Open In App

How can you view different types of responses in Postman?

Last Updated : 24 Nov, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Postman is a powerful tool that allows you to test and interact with APIs by sending requests and examining the responses. Responses from APIs can come in various formats, and understanding how to view these different types of responses is important for effective API development and debugging.

Prerequisites:

  • Basic knowledge of Postman
  • Postman should be installed in your system.

The following responses can be viewed in Postman

API Response contains multiple fields like Body, Pretty, Raw, Preview, etc. and we are going to explain each fields below –

Response Body

The response body contains the data and documents sent by the server to the client side. We can see that data in different data methods like Pretty, Raw, and Preview, and we can also change the format of the data into multiple formats like HTML, XML, JSON, etc. Fields contains by response body are as follows please read them for better understanding.

  • Pretty : Pretty is a data visualization method in which data is presented in a beautiful and attractive manner, and keys and values are represented in different colors that look attractive.
  • Raw : It contains data in raw format; there is no styling, just data formatted with spaces, and if the user wants to minify the data, they can check if it is possible or not.
  • Preview : It renders data into an Iframe tag so that the user can directly view the output of the code. If the response is in HTML, the developer does not need to run it; they can directly view the output in the Preview Section.

Screenshot-2023-11-24-085149

Cookies

Cookies are the small text information sent by the server to visit a particular site that helps to remember the website that you visited last time, like an e-commerce site that contains a cart that is implemented through cookies. In the cookies section, developers can go and check what particular cookies are being sent by the server to the client side with their name, value, the associated domain or path, and other information about them.

Headers

Headers are a kind of metadata about the request and response cycle. Headers contain all the details about the request and response cycle, like date, content type, connection, record, and all other details.

Screenshot-2023-11-24-091916

Test Results

If any API contains any test script that will be visible in test result section. Test script is a automate code which test the endpoint is working or not properly.

Network Information

Network information contains all the details about network protocols, like the local address, remote address, TLS protocol, and other network details about the particular request.

Screenshot-2023-11-24-093009

Status

It shows the situation and condition of the request the browser made to the server, indicating whether it is okay or not. If the status code is 200, then it’s okay. If it’s 404, it means the requested URL does not exist. There is a status code range from 100 to 500, which is configured in the backend to identify bugs and help debug the code easily without the need to scan the entire code.

Response Time

It is the time taken by the request endpoint from the server. If the response is received in 10 seconds, then it will be 10 seconds.

Size

The size is the total memory utilized by the response, including the size of the body and headers.

Screenshot-2023-11-24-093848


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads