DEV Community

Kelechi Kizito Ugwu
Kelechi Kizito Ugwu

Posted on

Introduction to HTTP status codes

At some point in your interactions with websites, you must have come across the dreaded 404 status code.
The 404 is a HyperText Transfer Protocol(HTTP) status code.
According to Wikipedia,
HTTP is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems.HTTP is the foundation of data communication for the World Wide Web, where hypertext documents include hyperlinks to other resources that the user can easily access, for example by a mouse click or by tapping the screen in a web browser.
There are so many status codes and they have different meaning

What is a HTTP status code?
HTTP status codes are numerical codes that indicate the state of a client’s(user’s) HTTP request to the server.The status codes are classified into 5 categories based on their responses:
Informational responses (100-199)
Successful responses (200-299)
Redirection responses (300-399)
Client error responses (400-499)
Server error responses (500-599)

Informational response signals ‘hold on’ to the user. In clearer terms, it indicates that the request was received and understood. It indicates that request processing continues and alerts the user to wait for a final response.

Successful response indicates ‘here you go’ to the user. This class of status codes indicates the action requested by the user was received, understood, and accepted.

Redirection reponse indicates ‘go away’ to the user. The response signifies that the user needs to take additional steps to complete the request.

Client error response indicates ‘the user fucked up’. This class of status code is intended for situations in which the error seems to have been caused by the user. The infamous 404 status code signifies the requested source could not be found.

Sever error response means ‘the server fucked up’. In a case in which the server is aware that it has encountered an error or is otherwise incapable of performing the request, the status code begins with a ‘5’.

Top comments (2)

Collapse
 
jonrandy profile image
Jon Randy 🎖️

Best HTTP response code is 418 - I'm a teapot

Collapse
 
kelechikizito profile image
Kelechi Kizito Ugwu

😂 I agree.