Standard Status Codes in Postman and What They Mean

Standard Status Codes in Postman and What They Mean

For those new to using Postman, the concept of status codes may seem daunting. However, status codes are simply three-digit numbers that provide information on the status of an HTTP request made in Postman. 

These codes play a crucial role in understanding whether a request was successful or if any errors occurred. Postman supports all five classes of HTTP status codes. 

In this, we will be delving into the standard status code in Postman and what they signify. We will take a closer look at each of these classes and examine the status codes they contain.

By the end of this article, you will have a better understanding of what status codes are and how to interpret them in Postman, including how to view the status code of a request in the response panel.

1xx Status Codes

The 1xx status codes are considered to be informational, indicating that the server has received the request and is still processing it. This class of status codes is relatively limited, and the most commonly encountered code in this category is:

101 Switching Protocols

This status code indicates that the server is transitioning from HTTP to HTTPS.

If you send a request to a website that has just moved from HTTP to HTTPS, you may obtain a 101 status code.

102 Processing

This status code indicates that the server has received the request and is processing it, but has not yet given a final answer. 

This status code is typically used when a request takes a long time to process, and the server wants to keep the connection open to send progress updates.

2xx Status Codes

2xx status codes signify that the request was successful.The most common 2xx status codes are:

200 OK

This status code signifies that the request was successful and that the server returned the required data. 

For example, if you request to a REST API to retrieve a user’s profile information, and the server returns the data, you’ll receive a 200 status code.

201 Created

This status code signifies that the request was successful and that a new resource on the server was created. 

For example, if you request to a REST API to create a new user, and the server successfully creates the user, you’ll receive a 201 status code.

204 No Content

This status code indicates that the server has successfully processed the request, but there is no data to return. 

For example, if you request to delete a resource, and the server successfully deletes the resource, you’ll receive a 204 status code.

206 Partial Content

This status code indicates that the server successfully handled a partial GET request. This status code is frequently used when a client requests a huge file, which the server provides in pieces. The client may then put the chunks together to produce the entire file.

3xx Status Codes

3xx status codes indicate redirection. They indicate that the client must take additional action to complete the request. The following are the most frequent 3xx status codes:

301 Moved Permanently

A 301 status code is given when a requested resource has been permanently relocated to a new URL. As an example, suppose a website changes its domain name, and the server responds with a 301 response code with the new URL.

302 Found

This status code signifies that the requested resource has been relocated to a different URL temporarily. This status code is similar to the 301 status code, but the change is temporary.

304 Not Modified

This status code implies that the requested resource has not been updated since its last access. This status code is typically used with caching to reduce server load.

4xx Status Codes

The 4xx status codes denote client-caused problems, suggesting that the request was defective in some manner, such as including improper authentication credentials or arguments. The 4xx status codes are some of the most common error codes.

400 Bad Request

This status code indicates that the client has sent a malformed request, such as missing or invalid parameters.

401 Unauthorized

This status code indicates that the client needs to authenticate to access the requested resource.

403 Forbidden

This status code indicates that the client is authenticated but does not have permission to access the requested resource.

404 Not Found

This status code indicates that the requested resource does not exist on the server.

422 Unprocessable Entity – This status code indicates that the server understands the request but cannot process it due to a client-side error, such as invalid input data.

5xx Status Codes

5xx status codes indicate server errors. They indicate that the server was unable to fulfill the request due to an internal error. The following are the most frequent 5xx status codes:

500 Internal Server Error

This status code signifies that an unexpected problem occurred while the server was processing the request.

502 Bad Gateway

This status code signifies that the gateway or proxy server got an invalid answer from an upstream server.

503 Service Unavailable

The server is presently unable to handle the request due to maintenance or overload, as indicated by this status code.

Takeaway!

In conclusion, understanding status codes is essential for successful API testing, especially in Postman. 

By familiarizing yourself with the different status codes and their meanings, you can easily identify errors and know how to respond to them. 

This quick brief on handling Status Code in Postman provides a great starting point to expand your knowledge in this area. 

To learn more about API Testing with Postman and advance your skills, we recommend joining the Thrive Academy course on API Testing with Postman. 

Don’t miss out on this opportunity to master the art of testing and become a proficient tester.

Written by

The Test Tribe

Leave a Reply

Your email address will not be published.

Related Posts

TestFlix - Biggest Virtual Testing Conference

Advertisement (Know More)

Get Top Community News

    Top Event and other The Test Tribe updates to your Inbox.

     

    Categories

    Tags