@naverpay/es-http-status-codes
Version:
A lightweight, tree-shakable utility for HTTP status codes and reason phrases in TypeScript/JavaScript. Auto-generated and ESM-compatible.
71 lines (68 loc) • 2.55 kB
text/typescript
declare const HttpStatusCodes: {
readonly CONTINUE: 100;
readonly SWITCHING_PROTOCOLS: 101;
readonly PROCESSING: 102;
readonly EARLY_HINTS: 103;
readonly OK: 200;
readonly CREATED: 201;
readonly ACCEPTED: 202;
readonly NON_AUTHORITATIVE_INFORMATION: 203;
readonly NO_CONTENT: 204;
readonly RESET_CONTENT: 205;
readonly PARTIAL_CONTENT: 206;
readonly MULTI_STATUS: 207;
readonly ALREADY_REPORTED: 208;
readonly IM_USED: 226;
readonly MULTIPLE_CHOICES: 300;
readonly MOVED_PERMANENTLY: 301;
readonly FOUND: 302;
readonly SEE_OTHER: 303;
readonly NOT_MODIFIED: 304;
readonly USE_PROXY: 305;
readonly TEMPORARY_REDIRECT: 307;
readonly PERMANENT_REDIRECT: 308;
readonly BAD_REQUEST: 400;
readonly UNAUTHORIZED: 401;
readonly PAYMENT_REQUIRED: 402;
readonly FORBIDDEN: 403;
readonly NOT_FOUND: 404;
readonly METHOD_NOT_ALLOWED: 405;
readonly NOT_ACCEPTABLE: 406;
readonly PROXY_AUTHENTICATION_REQUIRED: 407;
readonly REQUEST_TIMEOUT: 408;
readonly CONFLICT: 409;
readonly GONE: 410;
readonly LENGTH_REQUIRED: 411;
readonly PRECONDITION_FAILED: 412;
readonly PAYLOAD_TOO_LARGE: 413;
readonly URI_TOO_LONG: 414;
readonly UNSUPPORTED_MEDIA_TYPE: 415;
readonly RANGE_NOT_SATISFIABLE: 416;
readonly EXPECTATION_FAILED: 417;
readonly IM_A_TEAPOT: 418;
readonly MISDIRECTED_REQUEST: 421;
readonly UNPROCESSABLE_ENTITY: 422;
readonly LOCKED: 423;
readonly FAILED_DEPENDENCY: 424;
readonly UPGRADE_REQUIRED: 426;
readonly PRECONDITION_REQUIRED: 428;
readonly TOO_MANY_REQUESTS: 429;
readonly REQUEST_HEADER_FIELDS_TOO_LARGE: 431;
readonly UNAVAILABLE_FOR_LEGAL_REASONS: 451;
readonly INTERNAL_SERVER_ERROR: 500;
readonly NOT_IMPLEMENTED: 501;
readonly BAD_GATEWAY: 502;
readonly SERVICE_UNAVAILABLE: 503;
readonly GATEWAY_TIMEOUT: 504;
readonly HTTP_VERSION_NOT_SUPPORTED: 505;
readonly VARIANT_ALSO_NEGOTIATES: 506;
readonly INSUFFICIENT_STORAGE: 507;
readonly LOOP_DETECTED: 508;
readonly NOT_EXTENDED: 510;
readonly NETWORK_AUTHENTICATION_REQUIRED: 511;
};
type HttpStatusCode = (typeof HttpStatusCodes)[keyof typeof HttpStatusCodes];
type HttpStatusCodeKey = keyof typeof HttpStatusCodes;
declare const HttpStatusCodeKeys: HttpStatusCodeKey[];
declare const ReasonPhrases: Record<HttpStatusCode, string>;
export { type HttpStatusCode, type HttpStatusCodeKey, HttpStatusCodeKeys, HttpStatusCodes, ReasonPhrases };