Saltar al contenido
uencoder

HTTP Status Codes Completar Referencia

Todo HTTP respuesta status código clases, común codes, y sus semantics per RFC 9110.

Status Code Classes

HTTP status codes are three-digit integers grouped into five classes by the leading digit. The 1xx class indicates provisional information, 2xx indicates success, 3xx indicates redirection, 4xx indicates client error, and 5xx indicates server error. The class determines how generic clients handle the response when they do not recognize the specific code. Understanding the class semantics is essential for correct client behavior.

200 OK
Request succeeded, response body contains resource
GET success
201 Created
Resource created, Location header identifies it
POST success
301 Moved Permanently
Resource relocated, cache the new Location
permanent redirect
404 Not Found
Resource does not exist at this URI
missing resource
500 Internal Server Error
Server failed unexpectedly
unhandled exception

Redirection Codes

The 3xx class guides clients to an alternative location. Permanent redirects (301, 308) should be cached, while temporary redirects (307, 308 with non-GET) preserve the original method. The 303 See Other redirects a POST to a GET on another resource, commonly used after form submission. Mixing permanent and temporary redirects causes cache poisoning, so the choice must reflect the actual permanence of the relocation.

Error Handling

Client error codes (4xx) indicate the request was malformed or unauthorized and should not be retried without modification. Server error codes (5xx) may be transient and can be retried with backoff. The 429 Too Many Requests code signals rate limiting and includes a Retry-After header. Distinguishing retriable from non-retriable errors prevents retry storms and improves reliability.

Herramientas relacionadas

参考链接