@poppanator/http-constants
Version:
This package contains various HTTP constants: http status codes and texts, HTTP header names and HTTP methods, and a few related utility function.
98 lines (88 loc) • 5.07 kB
text/typescript
// -------------------------------------------------------------------------- //
// //
// Informational //
// //
// -------------------------------------------------------------------------- //
export const Continue = 'Continue'
export const SwitchingProtocol = 'Switching Protocol'
export const Processing = 'Processing'
export const EarlyHints = 'Early Hints'
// -------------------------------------------------------------------------- //
// //
// Successful //
// //
// -------------------------------------------------------------------------- //
export const Ok = 'OK'
export const Created = 'Created'
export const Accepted = 'Accepted'
export const NonAuthoritativeInformation = 'Non Authoritative Information'
export const NoContent = 'No Content'
export const ResetContent = 'Reset Content'
export const PartialContent = 'Partial Content'
export const MultiStatus = 'Multi Status'
export const AlreadyReported = 'Already Reported'
export const ImUsed = `I'm Used`
// -------------------------------------------------------------------------- //
// //
// Redirects //
// //
// -------------------------------------------------------------------------- //
export const MultipleChoices = 'Multiple Choices'
export const MovedPermanently = 'Moved Permanently'
export const Found = 'Found'
export const SeeOther = 'See Other'
export const NotModified = 'Not Modified'
export const UseProxy = 'Use Proxy'
export const SwitchProxy = 'Switch Proxy'
export const TemporaryRedirect = 'Temporary Redirect'
export const PermanentRedirect = 'Permanent Redirect'
// -------------------------------------------------------------------------- //
// //
// Client errors //
// //
// -------------------------------------------------------------------------- //
export const BadRequest = 'Bad Request'
export const Unauthorized = 'Unauthorized'
export const PaymentRequired = 'Payment Required'
export const Forbidden = 'Forbidden'
export const NotFound = 'Not Found'
export const MethodNotAllowed = 'Method Not Allowed'
export const NotAcceptable = 'Not Acceptable'
export const ProxyAuthenticationRequired = 'Proxy Authentication Required'
export const RequestTimeout = 'Request Timeout'
export const Conflict = 'Conflict'
export const Gone = 'Gone'
export const LengthRequired = 'Length Required'
export const PreconditionFailed = 'Precondition Failed'
export const PayloadTooLarge = 'Payload Too Large'
export const UriTooLong = 'URI Too Long'
export const UnsupportedMediaType = 'Unsupported Media Type'
export const RangeNotSatisfiable = 'Range Not Satisfiable'
export const ExpectationFailed = 'Expectation Failed'
export const ImAteapot = `I'm A Teapot`
export const MisdirectedRequest = 'Misdirected Request'
export const UnprocessableEntity = 'Unprocessable Entity'
export const Locked = 'Locked'
export const FailedDependency = 'Failed Dependency'
export const TooEarly = 'Too Early'
export const UpgradeRequired = 'Upgrade Required'
export const PreconditionRequired = 'Precondition Required'
export const TooManyRequests = 'Too Many Requests'
export const RequestHeaderFieldsTooLarge = 'Request Header Fields Too Large'
export const UnavailableForLegalReasons = 'Unavailable For Legal Reasons'
// -------------------------------------------------------------------------- //
// //
// Server errors //
// //
// -------------------------------------------------------------------------- //
export const InternalServerError = 'Internal Server Error'
export const NotImplemented = 'Not Implemented'
export const BadGateway = 'Bad Gateway'
export const ServiceUnavailable = 'Service Unavailable'
export const GatewayTimeout = 'Gateway Timeout'
export const HttpVersionNotSupported = 'HTTP Version Not Supported'
export const VariantAlsoNegotiates = 'Variant Also Negotiates'
export const InsufficientStorage = 'Insufficient Storage'
export const LoopDetected = 'Loop Detected'
export const NotExtended = 'Not Extended'
export const NetworkAuthenticationRequired = 'Network Authentication Required'