Common HTTP Response Status Codes and Their Meanings

0

HTTP stands for hypertext transfer protocol. The Hypertext Transfer Protocol is an application layer protocol for distributing collaborative and hypermedia information systems. It is a set of protocols that allows users to interact with the server with the help of a client. If you are an active user, you must have come across a lot of errors and HTTP response status codes. In this article, we will discuss some common HTTP response status codes and their descriptions.

 

Common HTTP Response Status Codes

Let us understand the HTTP status codes cheat sheet in detail. We will discuss each status code one by one.

HTTP Responses are grouped basically in five classes:-

  1. Informational responses (100–199)
  2. Successful responses (200–299)
  3. Redirects (300– 399)
  4. Client errors (400– 499)
  5. Server errors (500–599)

Let us check some HTTP response status codes one by one:-

 

Informational Response Codes

100 Continue

This HTTP status code shows that the client should continue with the request and everything is going smooth till now.

101 Switching Protocol

This will be shown when there will be a request UPGRADE header from the client-side and it refers to the protocol to which the server is trying to switch.

102 Processing (WebDAV)

This HTTP status code is generated when the response is in process and the server has already received the request.

Don’t miss: How Stay Safe While Using Internet

 

103 Early Hints

This status code pops up to be used with the link header so that the agent can start loading the resources while the server is busy creating a response.

 

Successful HTTP Response

200 OK ( HTTP response code for OK )

This is generated when the request is successful. The different method may be used:-

GET: The resource is being successfully transmitted in the message.

HEAD: Entity headers containing the meta data are transmitted in the message body

TRACE: This method is used to trace the request that was sent to the server.

POST: It transfers the resource that tells about the action of the request.

 

201 Created

This response code is generated when a new response is created on the basis of request. POST and PUT requests are responsible for resource creation.

202 Accepted

It will be generated when the server has accepted the sent request but the action has not been taken till now.

203 Non-Authoritative Information

Such status code is generated in case the returned response is not similar to the one generated from the origin server instead it has been gathered from another third-party copy.

It is used when a backup of resource is created.

204 No Content

This response code is generated when no content is available for sending in return for the request. In this case, the user agent is modified its cached headers and replaces them with new ones.

205 Reset Content

It is generated when the content sending the request needs to be reset.

206 Partial Content

This response is created when the range header is sent to the client side to ask only for a partial part of the content.

207 Multi-Status ( WebDAV)

This response is generated when multiple instances of resources are created and multiple codes are needed.

208 Already Reported (WebDAV)

The 208 (Already Reported) status code may be used in a <dav: propstat> response element in order to avoid listing the internal members of multiple bindings to the same collection again and again.

226 IM Used ( HTTP Delta Encoding)

The response code 226 is generated when the server has completed a GET request for the resource and the response is a representation of the result of one or more instance-modifications done on the current instance.

 

Redirection Message Status Codes

300 Multiple Choice

This response code is generated when more than one response is available for a sent request. The user can choose out of the options through the HTML links to multiple choices available.

301 Moved Permanently

This HTTP response code occurs when the URL of the resource you are looking for has changed and moved to a new address. The new URL is displayed to the user. The user can click on it and access the new URL.

302 Found

This response code is generated when the requested resource has moved temporarily, changes may be made to the URL of the resource in the future but for now, the same URL must be used to access the resource.

303 See Other

This response code is generated for the client to access the requested resource at another URL by using a GET request.

304 Not Modified

This response is generated when there is a need for caching purposes. No modifications has been done and the client can use the cached version of the resource.

305 Use Proxy

This status code is generated when the servers want to convey that a proxy should be used to access this resource ( due to security issues).

306 Unused

This response HTTP status code is no more in use. It was used in the earlier specifications of HTTP.

307 Temporary Redirect

The server generate this response code to direct the client to get the requested response at a different URL. The condition is that the same method must be used like the previous request. If a PUT method was used in the first request then the same request must be used in the second request.

308 Permanent Redirect

This status code says that the resource has been permanently moved to a new URL. It is specified by Location: HTTP Response Header. The  HTTP method used should not be changed.

 

Client Error Response Codes

Now let us see some common error response codes at client side.

400 Bad Request

This response is generated when the server is not able to understand the request due to error in syntax.

401 Unauthorized

This HTTP status code means unauthorized but semantically it actually means not authenticated. Authentication is required by the client to access the resource.

402 Payment Required

This status code was made for use in the future. It is used very rarely. The code was created for digital payments.

403 Forbidden

It is generated when the client doesn’t have access rights, is unauthorized. The server refuses access to the resource. It is different from error code 401, the server knows about the client.

404 Not Found

This error code is quite common and you too must have encountered this error code. It is generated when the requested resource doesn’t exist. The server can also show 404 error to users that are not authorized to view the resource.

405 Method Not Allowed

This type of error code occurs when the method is known to the server but the method has been disabled due to some reasons. Important methods must not be disabled.

More to come…..!

 

So, these were some common HTTP status codes. You must have encountered some of these while surfing the internet. Hope you found this article useful. Don’t forget to share it with others. Stay connected to TechAdvises for more such content.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Leave A Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.