Networking
HTTP Status & Header Reference
Look up status codes with their real-world behaviour, and format or review response headers.
100ContinueThe client should continue with the request body.
RFC 9110
101Switching ProtocolsThe server is switching protocols as requested, as in a WebSocket upgrade.
RFC 9110
103Early HintsPreliminary headers, usually Link headers for preloading, sent before the final response.
RFC 8297
200OKThe request succeeded.
RFC 9110
201CreatedThe request succeeded and created a resource. Should carry a Location header.
RFC 9110
202AcceptedThe request was accepted for processing but is not complete.
RFC 9110
204No ContentSuccess with no response body.
A 204 must not include a body; some clients hang if one is sent.
RFC 9110
206Partial ContentThe response carries the byte range the client asked for.
RFC 9110
301Moved PermanentlyThe resource has a new permanent URL.
Clients historically rewrite POST to GET on a 301. Use 308 to preserve the method.
RFC 9110
302FoundThe resource is temporarily at a different URL.
Also rewrites POST to GET in practice. Use 307 to preserve the method.
RFC 9110
303See OtherFetch the result from another URL with GET.
The one redirect that is specified to change the method to GET — the POST/redirect/GET pattern.
RFC 9110
304Not ModifiedThe cached copy is still valid.
Must not carry a body, and the client reuses its cached entity.
RFC 9110
307Temporary RedirectTemporary, and the method and body must be preserved.
RFC 9110
308Permanent RedirectPermanent, and the method and body must be preserved.
RFC 9110
400Bad RequestThe server could not parse the request.
RFC 9110
401UnauthorizedAuthentication is required or failed.
Means unauthenticated despite the name, and should carry a WWW-Authenticate header. Use 403 for an authenticated but unauthorized caller.
RFC 9110
403ForbiddenThe server understood the request and refuses to authorize it.
RFC 9110
404Not FoundNo resource at this URL.
RFC 9110
405Method Not AllowedThe method is not supported for this resource.
Must include an Allow header listing the permitted methods.
RFC 9110
408Request TimeoutThe client took too long to send the request.
RFC 9110
409ConflictThe request conflicts with the resource's current state, as in a failed optimistic update.
RFC 9110
410GoneThe resource existed and has been permanently removed.
RFC 9110
412Precondition FailedAn If-Match or If-Unmodified-Since condition did not hold.
RFC 9110
413Content Too LargeThe request body exceeds the server's limit.
RFC 9110
415Unsupported Media TypeThe body's Content-Type is not supported.
RFC 9110
418I'm a teapotAn April Fools' joke from RFC 2324 that many servers still implement.
RFC 2324
422Unprocessable ContentThe syntax is valid but the content is semantically wrong.
Widely used for validation failures, though 400 is also correct.
RFC 9110
428Precondition RequiredThe server requires a conditional request, to prevent lost updates.
RFC 6585
429Too Many RequestsThe client is being rate limited.
Should carry Retry-After so the client knows when to retry.
RFC 6585
431Request Header Fields Too LargeThe headers exceed the server's limit — often an oversized cookie.
RFC 6585
500Internal Server ErrorAn unexpected server-side failure.
RFC 9110
501Not ImplementedThe server does not support the method at all.
RFC 9110
502Bad GatewayAn upstream server returned an invalid response.
From a reverse proxy this usually means the backend closed the connection or is unreachable.
RFC 9110
503Service UnavailableThe server is temporarily unable to handle the request.
Should carry Retry-After. Load balancers return this when no healthy backend exists.
RFC 9110
504Gateway TimeoutAn upstream server did not respond in time.
RFC 9110
507Insufficient StorageThe server cannot store the representation needed to complete the request.
RFC 4918