@js-thing/http-status-codes
Version:
Contains properly documented HTTP status code enums, reason phrases and helpers as defined in RFC
87 lines (86 loc) • 4.8 kB
TypeScript
import HttpInformationStatusCodes from './HttpInformationStatusCodes';
import HttpSuccessStatusCodes from './HttpSuccessStatusCodes';
import HttpRedirectionStatusCodes from './HttpRedirectionStatusCodes';
import HttpClientErrorStatusCodes from './HttpClientErrorStatusCodes';
import HttpServerErrorStatusCodes from './HttpServerErrorStatusCodes';
/**
* Enum for all HTTP status codes
*
* HTTP response status codes indicate whether a specific
* HTTP request has been successfully completed.
*
* This enum is a combined enum of all HTTP status codes
*
* @readonly
* @enum {number}
*/
export declare const HttpStatusCodes: {
[x: number]: string;
InternalServerError: HttpServerErrorStatusCodes.InternalServerError;
NotImplemented: HttpServerErrorStatusCodes.NotImplemented;
BadGateway: HttpServerErrorStatusCodes.BadGateway;
ServiceUnavailable: HttpServerErrorStatusCodes.ServiceUnavailable;
GatewayTimeout: HttpServerErrorStatusCodes.GatewayTimeout;
HTTPVersionNotSupported: HttpServerErrorStatusCodes.HTTPVersionNotSupported;
VariantAlsoNegotiates: HttpServerErrorStatusCodes.VariantAlsoNegotiates;
InsufficientStorage: HttpServerErrorStatusCodes.InsufficientStorage;
LoopDetected: HttpServerErrorStatusCodes.LoopDetected;
NotExtended: HttpServerErrorStatusCodes.NotExtended;
NetworkAuthenticationRequired: HttpServerErrorStatusCodes.NetworkAuthenticationRequired;
BadRequest: HttpClientErrorStatusCodes.BadRequest;
UnAuthorised: HttpClientErrorStatusCodes.UnAuthorised;
PaymentRequired: HttpClientErrorStatusCodes.PaymentRequired;
Forbidden: HttpClientErrorStatusCodes.Forbidden;
NotFound: HttpClientErrorStatusCodes.NotFound;
MethodNotAllowed: HttpClientErrorStatusCodes.MethodNotAllowed;
NotAcceptable: HttpClientErrorStatusCodes.NotAcceptable;
ProxyAuthenticationRequired: HttpClientErrorStatusCodes.ProxyAuthenticationRequired;
RequestTimeout: HttpClientErrorStatusCodes.RequestTimeout;
Conflict: HttpClientErrorStatusCodes.Conflict;
Gone: HttpClientErrorStatusCodes.Gone;
LengthRequired: HttpClientErrorStatusCodes.LengthRequired;
PreconditionFailed: HttpClientErrorStatusCodes.PreconditionFailed;
PayloadTooLarge: HttpClientErrorStatusCodes.PayloadTooLarge;
URITooLong: HttpClientErrorStatusCodes.URITooLong;
UnsupportedMediaType: HttpClientErrorStatusCodes.UnsupportedMediaType;
RangeNotSatisfiable: HttpClientErrorStatusCodes.RangeNotSatisfiable;
ExpectationFailed: HttpClientErrorStatusCodes.ExpectationFailed;
IAmATeapot: HttpClientErrorStatusCodes.IAmATeapot;
MisdirectedRequest: HttpClientErrorStatusCodes.MisdirectedRequest;
UnprocessableEntity: HttpClientErrorStatusCodes.UnprocessableEntity;
Locked: HttpClientErrorStatusCodes.Locked;
FailedDependency: HttpClientErrorStatusCodes.FailedDependency;
TooEarly: HttpClientErrorStatusCodes.TooEarly;
UpgradeRequired: HttpClientErrorStatusCodes.UpgradeRequired;
PreconditionRequired: HttpClientErrorStatusCodes.PreconditionRequired;
TooManyRequests: HttpClientErrorStatusCodes.TooManyRequests;
RequestHeaderFieldsTooLarge: HttpClientErrorStatusCodes.RequestHeaderFieldsTooLarge;
UnavailableForLegalReasons: HttpClientErrorStatusCodes.UnavailableForLegalReasons;
MultipleChoice: HttpRedirectionStatusCodes.MultipleChoice;
MovedPermanently: HttpRedirectionStatusCodes.MovedPermanently;
Found: HttpRedirectionStatusCodes.Found;
SeeOther: HttpRedirectionStatusCodes.SeeOther;
NotModified: HttpRedirectionStatusCodes.NotModified;
UseProxy: HttpRedirectionStatusCodes.UseProxy;
Unused: HttpRedirectionStatusCodes.Unused;
TemporaryRedirect: HttpRedirectionStatusCodes.TemporaryRedirect;
PermanentRedirect: HttpRedirectionStatusCodes.PermanentRedirect;
Ok: HttpSuccessStatusCodes.Ok;
Created: HttpSuccessStatusCodes.Created;
Accepted: HttpSuccessStatusCodes.Accepted;
NonAuthoritativeInformation: HttpSuccessStatusCodes.NonAuthoritativeInformation;
NoContent: HttpSuccessStatusCodes.NoContent;
ResetContent: HttpSuccessStatusCodes.ResetContent;
PartialContent: HttpSuccessStatusCodes.PartialContent;
MultiStatus: HttpSuccessStatusCodes.MultiStatus;
AlreadyReported: HttpSuccessStatusCodes.AlreadyReported;
IMUsed: HttpSuccessStatusCodes.IMUsed;
Continue: HttpInformationStatusCodes.Continue;
SwitchingProtocol: HttpInformationStatusCodes.SwitchingProtocol;
Processing: HttpInformationStatusCodes.Processing;
EarlyHints: HttpInformationStatusCodes.EarlyHints;
};
/**
* The type for HttpStatusCodes
*/
export declare type HttpStatusCodes = HttpInformationStatusCodes | HttpSuccessStatusCodes | HttpRedirectionStatusCodes | HttpClientErrorStatusCodes | HttpServerErrorStatusCodes;