Open In App

How can you view different types of responses in Postman?

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:

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.

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.

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.

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.

Article Tags :