Suggest an editImprove this articleRefine the answer for “What classes of HTTP codes exist?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**Classes of HTTP codes** are groups of **HTTP status codes** defined by the code's first digit that show the general result of processing the request. There are 5 classes of HTTP codes in total. **Key point:** 1xx is informational, 2xx is success, 3xx is redirection, 4xx is a client error, and 5xx is a server error.Shown above the full answer for quick recall.Answer (EN)Image**Classes of HTTP codes** are groups of **HTTP status codes** defined by **the code's first digit** that show **the general result of processing the request**. There are **5 classes of HTTP codes** in total. --- ## 1xx, Informational The request has been accepted, processing **is still continuing**. Rarely used, mostly for service purposes. Examples: - `100 Continue` - it is fine to continue sending the request An ordinary user almost never sees these. --- ## 2xx, Success The request **was completed successfully**. The most important and most frequently used codes. Examples: - `200 OK` - everything went fine - `201 Created` - the resource was created - `204 No Content` - success, but with no response body If you see 2xx, **everything is fine**. --- ## 3xx, Redirection The client needs to **take an additional action**, usually go to another address. Examples: - `301 Moved Permanently` - the resource has moved permanently - `302 Found` - a temporary redirect - `304 Not Modified` - the cache can be used Often used by browsers automatically. --- ## 4xx, Client error **An error in the client's request**: a wrong URL, no permissions, bad data. The most familiar codes. Examples: - `400 Bad Request` - an invalid request - `401 Unauthorized` - authorization is required - `403 Forbidden` - access is denied - `404 Not Found` - the resource was not found Important for an interview: **4xx is not the server's problem, it's a problem with the request**. --- ## 5xx, Server error The server received a correct request but **could not process it**. Examples: - `500 Internal Server Error` - an internal server error - `502 Bad Gateway` - an error while working with another server - `503 Service Unavailable` - the service is temporarily unavailable This is already **a problem on the server's side**. --- ## A short table to remember | Class | Meaning | |---|---| | 1xx | Information | | 2xx | Success | | 3xx | Redirection | | 4xx | Client error | | 5xx | Server error | --- ## Short answer for an interview Remember this wording: > **There are 5 classes of HTTP codes: 1xx are informational, 2xx are successful, 3xx are redirections, 4xx are client errors, and 5xx are server errors.**For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.