UNPKG

statuskit

Version:

Centralized HTTP status code constants for Node.js and TypeScript

68 lines (67 loc) 3.42 kB
declare const statusCode: { readonly Continue: 100; readonly SwitchingProtocols: 101; readonly Processing: 102; readonly EarlyHints: 103; readonly OK: 200; readonly Created: 201; readonly Accepted: 202; readonly NonAuthoritativeInformation: 203; readonly NoContent: 204; readonly ResetContent: 205; readonly PartialContent: 206; readonly MultiStatus: 207; readonly AlreadyReported: 208; readonly IMUsed: 226; readonly MultipleChoices: 300; readonly MovedPermanently: 301; readonly Found: 302; readonly SeeOther: 303; readonly NotModified: 304; readonly UseProxy: 305; readonly TemporaryRedirect: 307; readonly PermanentRedirect: 308; readonly BadRequest: 400; readonly Unauthorized: 401; readonly PaymentRequired: 402; readonly Forbidden: 403; readonly NotFound: 404; readonly MethodNotAllowed: 405; readonly NotAcceptable: 406; readonly ProxyAuthenticationRequired: 407; readonly RequestTimeout: 408; readonly Conflict: 409; readonly Gone: 410; readonly LengthRequired: 411; readonly PreconditionFailed: 412; readonly PayloadTooLarge: 413; readonly URITooLong: 414; readonly UnsupportedMediaType: 415; readonly RangeNotSatisfiable: 416; readonly ExpectationFailed: 417; readonly ImATeapot: 418; readonly MisdirectedRequest: 421; readonly UnprocessableEntity: 422; readonly Locked: 423; readonly FailedDependency: 424; readonly TooEarly: 425; readonly UpgradeRequired: 426; readonly PreconditionRequired: 428; readonly TooManyRequests: 429; readonly RequestHeaderFieldsTooLarge: 431; readonly UnavailableForLegalReasons: 451; readonly InternalServerError: 500; readonly NotImplemented: 501; readonly BadGateway: 502; readonly ServiceUnavailable: 503; readonly GatewayTimeout: 504; readonly HTTPVersionNotSupported: 505; readonly VariantAlsoNegotiates: 506; readonly InsufficientStorage: 507; readonly LoopDetected: 508; readonly NotExtended: 510; readonly NetworkAuthenticationRequired: 511; }; declare const statusText: Record<number, "Continue" | "SwitchingProtocols" | "Processing" | "EarlyHints" | "OK" | "Created" | "Accepted" | "NonAuthoritativeInformation" | "NoContent" | "ResetContent" | "PartialContent" | "MultiStatus" | "AlreadyReported" | "IMUsed" | "MultipleChoices" | "MovedPermanently" | "Found" | "SeeOther" | "NotModified" | "UseProxy" | "TemporaryRedirect" | "PermanentRedirect" | "BadRequest" | "Unauthorized" | "PaymentRequired" | "Forbidden" | "NotFound" | "MethodNotAllowed" | "NotAcceptable" | "ProxyAuthenticationRequired" | "RequestTimeout" | "Conflict" | "Gone" | "LengthRequired" | "PreconditionFailed" | "PayloadTooLarge" | "URITooLong" | "UnsupportedMediaType" | "RangeNotSatisfiable" | "ExpectationFailed" | "ImATeapot" | "MisdirectedRequest" | "UnprocessableEntity" | "Locked" | "FailedDependency" | "TooEarly" | "UpgradeRequired" | "PreconditionRequired" | "TooManyRequests" | "RequestHeaderFieldsTooLarge" | "UnavailableForLegalReasons" | "InternalServerError" | "NotImplemented" | "BadGateway" | "ServiceUnavailable" | "GatewayTimeout" | "HTTPVersionNotSupported" | "VariantAlsoNegotiates" | "InsufficientStorage" | "LoopDetected" | "NotExtended" | "NetworkAuthenticationRequired">; export default statusCode; export { statusText };