In this article, I am giving you a complete guide on http response codes as well as a cheat sheet which will help you when you are stuck on your project and will help you remember them.

What are http status codes?

HTTP status codes are the messages which are sent by the website's server to indicate whether the request sent by the developer or user has been successful or not.

What is the range of these http response codes?

These response codes or status codes usually have range from 100-400. Each of these ranges indicate different messages. Lets see the different ranges and their meanings on what they say.

  • 1xx : Informational
  • 2xx : Success
  • 3xx : Direction
  • 4xx : Client Error
  • 5xx : Server Error

Lets learn about each of these ranges and what are the different important status codes which you should know about.

1XX : Informational

100 => Continue :  Indicates so far everything is good. 

102 => Processing : Server is processing the request but no response is available yet.

2XX : Success

200 => Ok : Request has succeeded.

201 => Created : This the response sent after a post request.

3XX : Redirection

301 => Moved Permanently : The URL of the requested response has been changed permanently. New URL will be given in response.

304 => Not Modified : Response has not been modified, cached version can be used.

4XX : Client Error

400 => Bad Request : The server could not understand the request due to invalid syntax.

401 => Unauthorized : User is not authenticated to access the resource.

403 => Forbidden : Client is authenticated but does not have access.

404 => Not Found : The requested resource was not found.

5XX : Server Error

500 => Internal Server Error : The server has encountered a situation where it does not know how to handle.

502 => Bad Gateway : Gateway server got invalid response.

504 => Gateway Timeout : Gateway server couldn't get response in time.

These were the Important HTTP status codes which every developer should know about. Hope this was useful for you and learned something from this article.

Conclusion :

We learned about 5 different HTTP status code ranges and their meanings. We also explored most important response codes in each of these ranges.

You may also like to read :

Post a Comment

Previous Post Next Post