api: YAML JSON TOON Database version: 1.0.0 format: toon category: id: 334 slug: http-status-codes name: HTTP Status Codes description: Complete reference of HTTP response status codes. icon: globe created_at: 1783090350 dataset_count: 13 topic: overview: "This category is the reference for how HTTP clients and servers talk: the status codes that summarize a response, the methods that say what a request wants, the headers that carry metadata, and the mechanisms layered on top (authentication, caching, content negotiation, CORS and redirects). The codes and methods are defined by IETF specifications, chiefly RFC 9110, so their meaning is stable, but real servers and APIs bend them. The practical skill is to pick the most specific correct code and to know which behaviors (caching, retries, redirects) a client will infer from it." key_ideas[7]{term,meaning}: Status code class,"The first digit gives the class: 1xx informational, 2xx success, 3xx redirection, 4xx client error, 5xx server error." Safe and idempotent methods,"Safe methods (GET, HEAD, OPTIONS) do not change server state. Idempotent methods (those plus PUT and DELETE) have the same effect when repeated, which makes retries safe." 401 vs 403,401 means authentication is missing or invalid; 403 means the client is authenticated but not allowed. Redirect semantics,"301 and 308 are permanent, 302 and 307 temporary. 307 and 308 preserve the request method; 301 and 302 historically allow clients to change POST to GET." Cache validators,ETag and Last-Modified let a client ask whether its stored copy is still valid and receive 304 Not Modified instead of the full body. Content negotiation,"The client states preferences with Accept headers and the server chooses a representation, signaling dependence with Vary." CORS,"A browser mechanism that lets a server permit cross-origin requests with Access-Control headers, often after a preflight OPTIONS request." pitfalls[4]: "Returning 200 with an error message in the body. Clients, caches and monitors rely on the status code.",Using 404 and 403 inconsistently to hide or reveal that a resource exists; decide the policy and apply it uniformly.,Redirecting with 301 when a temporary move is intended. Browsers and search engines cache permanent redirects aggressively.,Setting Access-Control-Allow-Origin to * on responses that use credentials; browsers reject that combination. agent_tips[3]: "Retry only idempotent requests and 429, 502, 503 and 504 responses, honoring Retry-After and using exponential backoff with jitter.","When asked what a code means, give the code, the name, the typical cause and the action the client should take.",Quote RFC 9110 for definitions of methods and status codes and RFC 9111 for caching. start_with[2]: http-status-codes-complete,http-methods-reference datasets[13]{id,slug,title,description,tags,view_count,created_at,entry_count,summary}: 2402,http-cors-guide,CORS (Cross-Origin Resource Sharing) Guide,"Complete CORS reference: preflight requests, Access-Control headers, credentials, wildcard policies, and common pitfalls.","http,cors,cross-origin,security,preflight,access-control,same-origin",33,1778695229,14,"A guide to Cross-Origin Resource Sharing: the Access-Control response and request headers, what makes a request 'simple', and the common mistakes, such as combining a wildcard origin with credentials or forgetting to answer preflight requests." 2413,http-status-codes-complete,Complete HTTP Status Codes Reference,"Complete reference of all HTTP status codes organized by class: 1xx informational, 2xx success, 3xx redirection, 4xx client error, 5xx server error.","http,web,reference,status codes",56,1777673262,45,"The HTTP status codes most used in practice, grouped by class (informational, success, redirection, client error and server error) with the registered name and a one-line meaning, from 100 Continue and 200 OK to 418 and 511." 2396,http-authentication-methods,HTTP Authentication Methods,"HTTP authentication schemes: Basic, Bearer (JWT), Digest, OAuth 2.0, Mutual TLS, and modern alternatives like WebAuthn and passkeys.","http,authentication,basic,bearer,jwt,oauth2,digest,webauthn,passkeys",31,1778695229,16,"HTTP authentication schemes compared with their RFC, header, security level, typical uses and notes, from Basic and Bearer tokens to OAuth 2.0, OpenID Connect, mutual TLS, API keys and WebAuthn passkeys, followed by a short list of best practices." 2397,http-cache-directives,HTTP Cache-Control Directives,"Cache-Control directives for browser and shared caches, with example values, intended behavior, and common configuration mistakes.","http-status-codes,http cache directives,reference,engineering",61,1791798640,12,"Cache-Control directives for browser and shared caches, with example values, intended behavior, and common configuration mistakes. Each row includes a practical application and a failure to check before using it." 2398,http-caching-guide,"HTTP Caching: Complete Guide","HTTP caching strategies: Cache-Control directives, ETag/Last-Modified validation, CDN caching, stale-while-revalidate, and browser cache behavior.","http,caching,cache-control,etag,cdn,performance,browser-cache",38,1778695229,12,"A guide to HTTP caching directives and validation: Cache-Control values such as max-age, no-cache, no-store, private, public and immutable, and the validators ETag and Last-Modified, each with an example and notes on when it applies." 2399,http-client-error-guide,HTTP Client Error Status Codes (4xx),"Guide to 4xx client error responses: when to use 400 vs 401 vs 403 vs 404 vs 429, proper error responses, and user experience.","http,client-errors,4xx,error-handling,security,rate-limiting",40,1777673262,9,"A guide to the common 4xx client-error status codes: 400, 401, 403, 404, 405, 408, 409, 429 and 431, each with its cause, an example, a response body and notes, plus a standard error-response format and security notes." 2400,http-conditional-requests,HTTP Conditional Requests and Validators,"Conditional request headers, comparison rules, and response outcomes for safe caching and lost-update protection.","http-status-codes,http conditional requests,reference,engineering",45,1791798640,8,"Conditional request headers, comparison rules, and response outcomes for safe caching and lost-update protection. Each row includes a practical application and a failure to check before using it." 2401,http-content-negotiation,HTTP Content Negotiation,"HTTP content negotiation: Accept, Accept-Language, Accept-Encoding, Accept-Charset headers, content type selection, and server-driven vs agent-driven negotiation.","http,content-negotiation,accept,accept-language,accept-encoding,media-types",39,1778695229,15,"How clients and servers agree on a representation: Accept, Accept-Language, Accept-Encoding and Content-Type headers, the Vary header that records dependence, and common media types from JSON and XML to multipart and form encodings." 2403,http-methods-reference,HTTP Methods Reference,"Standard HTTP request methods: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS, TRACE with safety, idempotency, and body characteristics.","http,methods,rest,web",32,1777673262,9,"The standard HTTP methods with their safety, idempotence, whether they carry a body and what they are for: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS and TRACE, plus CONNECT for proxy tunnels." 2406,http-redirect-status-codes,HTTP Redirect Status Codes (3xx),"Comprehensive guide to HTTP 3xx redirect codes: when to use 301 vs 302 vs 307 vs 308, SEO implications, and browser behavior.","http,redirects,3xx,seo,permanent,temporary",30,1777673262,17,"A guide to the 3xx redirection codes (300, 301, 302, 303, 304, 307 and 308) with when to use each, an example and notes, followed by best practices on redirect chains, caching and SEO." 2408,http-request-retry-decisions,HTTP Retry Decision Reference,"Failure scenarios and retry decisions for HTTP clients, including idempotency, backoff, deadlines, and ambiguous writes.","http-status-codes,http request retry decisions,reference,engineering",40,1791798640,12,"Failure scenarios and retry decisions for HTTP clients, including idempotency, backoff, deadlines, and ambiguous writes. Each row includes a practical application and a failure to check before using it." 2411,http-server-error-guide,HTTP Server Error Status Codes (5xx),"Guide to 5xx server error responses: diagnosing 500, 502, 503, 504 errors, retry strategies, and monitoring.","http,server-errors,5xx,monitoring,retry,devops",35,1777673262,12,"A guide to 5xx server-error codes (500, 501, 502, 503, 504, 507 and 511) with causes, diagnosis steps, what a client should do and what a server owner should fix, plus a retry strategy and monitoring metrics." 2412,http-status-code-best-practices,HTTP Status Code Best Practices,"Guidelines for proper HTTP status code usage in REST APIs: when to use each code, common mistakes, and industry conventions.","http,status-codes,best-practices,rest,api-design,error-handling",27,1777673262,8,"Practical guidance on using HTTP status codes in APIs: precision, async semantics, redirects, rate limiting with 429, cache-aware codes, consistent error formats and idempotency, each with a recommendation and a common mistake."