HTTP response codes are used to indicate success, failure, and other properties about the result of an HTTP request.
Each HTTP response is accompanied by a status code, and they are broken into five categories. Each of the response status codes is used to convey general information about the outcome of the request.
Let's explore some common HTTP Status Codes because who knows you shall need them tomorrow and after that the whole list of all the Codes for reference!
But before that, let's read about a fun fact.
π PS: Don't forget to bookmark the post!
π€ Fun Fact
Believe it or not, "418 I'm a Teapot" is a legitimate HTTP status code, although it comes with a twist of humour!
It was originally part of an April Fools' joke π€‘ by the Internet Engineering Task Force.
This status code was introduced in the "Hyper Text Coffee Pot Control Protocol" (HTCPCP) in 1998.
Throwback to my article on this topic -
π The Most Common HTTP Status Codes
- 200 OK
- 201 Created
- 301 Moved Permanently
- 302 Found
- 304 Not Modified
- 400 Bad Request
- 401 Unauthorized
- 403 Forbidden
- 404 Not Found
- 500 Internal Server Error
- 501 Not Implemented
- 504 Gateway Timeout
π The Great List of HTTP Status Codes
1οΈβ£ Information Responses (100 β 199):
- 100 Continue
- 101 Switching Protocols
- 102 Processing (WebDAV)
- 103 Early Hints
2οΈβ£ Successful Responses (200 β 299):
- 200 OK
- 201 Created
- 202 Accepted
- 203 Non-Authoritative Information
- 204 No Content
- 205 Reset Content
- 206 Partial Content
- 207 Multi-Status (WebDAV)
- 208 Already Reported (WebDAV)
- 226 IM Used (HTTP Delta encoding)
3οΈβ£ Redirection Messages (300 β 399):
- 300 Multiple Choices
- 301 Moved Permanently
- 302 Found
- 303 See Other
- 304 Not Modified
- 305 Use Proxy Deprecated
- 307 Temporary Redirect
- 308 Permanent Redirect
4οΈβ£ Client Error Responses (400 β 499):
- 400 Bad Request
- 401 Unauthorized
- 402 Payment Required Experimental
- 403 Forbidden
- 404 Not Found
- 405 Method Not Allowed
- 406 Not Acceptable
- 407 Proxy Authentication Required
- 408 Request Timeout
- 409 Conflict
- 410 Gone
- 411 Length Required
- 412 Precondition Failed
- 413 Payload Too Large
- 414 URI Too Long
- 415 Unsupported Media Type
- 416 Range Not Satisfiable
- 417 Expectation Failed
- 418 I'm a teapot
- 421 Misdirected Request
- 422 Unprocessable Content (WebDAV)
- 423 Locked (WebDAV)
- 424 Failed Dependency (WebDAV)
- 425 Too Early Experimental
- 426 Upgrade Required
- 428 Precondition Required
- 429 Too Many Requests
- 431 Request Header Fields Too Large
- 451 Unavailable For Legal Reasons
5οΈβ£ Server Error Responses (500 β 599):
- 500 Internal Server Error
- 501 Not Implemented
- 502 Bad Gateway
- 503 Service Unavailable
- 504 Gateway Timeout
- 505 HTTP Version Not Supported
- 506 Variant Also Negotiates
- 507 Insufficient Storage (WebDAV)
- 508 Loop Detected (WebDAV)
- 510 Not Extended
- 511 Network Authentication Required
π€ Final Thoughts
HTTP responses are always accompanied by an HTTP response status code.
The first digit of a status code indicates the category, which often indicates whether the request succeeded or failed.
Each status code can be a valuable clue when troubleshooting problems between a client and a server.
Comment your thoughts about the awesome '418' status code!
I too had a few great laughs reading about this! π
Okay, that's it for today!
Connect with me @ Linktree.
Follow me on @ Twitter.
Quality content coming soon!
Happy Coding! π
Thanks for 26197! π€
Top comments (4)
Haha! I had never heard the teapot story. This Wikipedia article caught me up to speed.
Pretty cool that it has an April Fool's tie-in β gonna have to remember this for next year, haha!
This is a one of the most humorous things, if you think closely! Haha!
I recommend these wonderful creations π
HTTP Status Dogs
HTTP Status Dogs. Hypertext Transfer Protocol Response status codes. And dogs.
HTTP Cats
API for HTTP Cats
This is so cool! π