html

HTTP Successful Status Messages | Explained

HTTP is a commonly used internet protocol that allows the client-side and server-side to communicate with each other and every time this communication occurs an HTTP message is generated. These messages are commonly referred to as HTTP status messages.

There are plenty of HTTP message categories such as information status messages, redirection status messages, client error messages, etc. However, in this post, we are going to discuss the various response messages that fall under the category of HTTP successful status messages.

Before we jump into what HTTP successful status messages are, let’s first explore what HTTP status messages are in general.

What is an HTTP Status Message

The web browser and the server interact with each other every time a user takes a certain action. This interaction can sometimes be successful and sometimes it might not. No matter what the scenario is, the user is informed about this interaction through response messages which are commonly referred to as HTTP status messages.


What is an HTTP Successful Status Message

When the communication between the web browser and the server is successful HTTP successful status messages are generated. These successful status messages are assigned some codes (200, 201, 2xx) like any other status message. Some of the status messages that fall under this group are explained below.

200 OK

A response message confirming the successful completion of an HTTP request. The information in the message depends on the HTTP method used, for instance,

If the GET method is used then the resource requested is transmitted in response.

If the HEAD method is used then the headers of the resource requested are transmitted having no message body.

If the POST or PUT method is used then the message contains the result of the action.

If the TRACE method is used then the message consists of the request originally received by the server.

201 Created

A response message confirming the successful completion of the request as well as confirming the generation of a new resource. This message is often sent as a response to the POST or PUT method.

202 Accepted

A response message confirming the successful acceptance of a request, however, the request has not yet been processed. This is a non-committal response because no asynchronous response is sent later on confirming the successful processing of the request. These responses are designed for scenarios where the request is handled by another server or process, or for batch processing.

203 Non-Authoritative Information

A response message that confirms the successful processing of the request, however, the information provided as a result is extracted from another server. This information provided might be a variant of the initial version. The 200 OK response has priority over this response.

204 No Content

A response message that authenticates the successful completion of the request, however, no information is provided as a result of the response.

205 Reset Content

A response message that confirms that the request has been processed, however, the user who sent the request needs to reset the document through which the request was sent.

206 Partial Content

A response message that sends only a part of the resource requested due to the range header set by the client.

Conclusion

HTTP successful status messages are generated when the interaction between the web server and the browser is successful. Some of the status messages that fall under the category of successful status messages are 200 OK, 201 created, 202 Accepted, etc. The codes assigned to these messages are 200, 201, up to 2xx. Each of these messages hold a different meaning which we have discussed in detail in this post.

About the author

Naima Aftab

I am a software engineering professional with a profound interest in writing. I am pursuing technical writing as my full-time career and sharing my knowledge through my words.