DEV Community

Cover image for The HTTP Status Codes CheatSheet [SAVE IT!] πŸ“œβœ¨
Arjun Vijay Prakash
Arjun Vijay Prakash

Posted on

The HTTP Status Codes CheatSheet [SAVE IT!] πŸ“œβœ¨

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.

Image

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)

Collapse
 
michaeltharrington profile image
Michael Tharrington

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!

Collapse
 
arjuncodess profile image
Arjun Vijay Prakash

This is a one of the most humorous things, if you think closely! Haha!

Collapse
 
ccoveille profile image
Christophe Colombier

I recommend these wonderful creations πŸ˜†

HTTP Status Dogs

HTTP Status Dogs. Hypertext Transfer Protocol Response status codes. And dogs.

favicon httpstatusdogs.com

HTTP Cats

API for HTTP Cats

favicon http.cat
Collapse
 
arjuncodess profile image
Arjun Vijay Prakash

This is so cool! πŸ˜†