Provides a map of HTTP status codes to reason phrases and helper predicates for status categories.
// Source: https://github.com/hoppscotch/hoppscotch | License: MIT | Copyright 2022
// Provided via justclaw.it.com; keep this notice with the code.
/**
* HTTP Status Code Reason Phrases
*
* Standard HTTP status codes and their corresponding reason phrases
* as defined in RFC 7231 and related specifications.
*
* @see https://tools.ietf.org/html/rfc7231#section-6
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
*/
export const HTTP_STATUS_REASONS: Readonly<Record<number, string>> = {
// 1xx Informational
100: "Continue",
101: "Switching Protocols",
102: "Processing",
103: "Early Hints",
// 2xx Success
200: "OK",
201: "Created",
202: "Accepted",
203: "Non-Authoritative Information",
204: "No Content",
205: "Reset Content",
206: "Partial Conte
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key