HTTP status codes are three-digit responses from the server to the browser that indicates the status of the request. It is divided into 5 different categories, each category represents a different kind of status
1XX: Information
Is a temporary status code which means that the server has received the request and is continuing the process
100 Continue
101 Switching Protocols
102 Processing request
103 Early Hints
2XX: Success
Means that the request was successful and the browser has received the expected information
200 OK
201 Created
202 Accepted
203 Non-Authoritative Information
204 No Content
205 Reset Content
206 Partial Content
207 Multi-Status
208 Already Reported
226 IM Used
3XX: Redirection
The type of status means you have been redirected and the completion of the request requires further action, not necessarily from your side
300 Multiple Choices
301 Moved Permanently
302 Found
303 See Other
304 Not Modified
305 Use Proxy
306 Switch Proxy
307 Temporary Redirect
308 Permanent Redirect
4XX: Client Error
When the website or the page could not be reached and either the page is unavailable or the request contains bad syntax
400 Bad Request
401 Unauthorized
402 Payment Required
403 Forbidden
404 Not Found
405 Method Not Allowed
406 No 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 Entity
423 Locked
424 Failed Dependency
425 Too Early
426 Upgrade Required
428 Precondition Required
429 Too Man Requests
431 Request Header Fields Too Large
451 Unavailable For Legal Reasons
5XX: Server Error
While the request might be valid, the server could not complete the request. These kinds of errors are mostly caused due to problems internally within server
500 Internal Server Error
501 Not Impemented
502 Bad Gateway
503 Service Unavailable
504 Gateway Timeout
505 HTTP Version Not Supported
506 Variant Also Negotiates
507 Insufficient Storage
508 Loop Detected
510 Not Extended
511 Network Authentication Required
Finally, you may not need to memorize all of these status codes, but it's always good to know most of them, and organize your API responses as clear as possible
Top comments (3)
This is really helpful!
Thx for clean summary.
Good one