Sobes.tech
Junior — Middle

Can you list the main HTTP status codes that servers use to respond to clients?

sobes.tech AI

Answer from AI

The main HTTP status codes that servers use to respond to clients can be divided into several groups:

  • 1xx (Informational): 100 Continue, 101 Switching Protocols
  • 2xx (Success): 200 OK, 201 Created, 204 No Content
  • 3xx (Redirection): 301 Moved Permanently, 302 Found, 304 Not Modified
  • 4xx (Client Errors): 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 409 Conflict
  • 5xx (Server Errors): 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable

For example, a successful request usually returns 200 OK, and if the requested resource is not found — 404 Not Found.