@blackglory/http-status
Version:
A class-based HTTP status library
70 lines (69 loc) • 5.43 kB
TypeScript
import { HTTPStatus } from './http-status.js';
import * as Informational from './http-informational.js';
import * as Successful from './http-successful.js';
import * as Redirection from './http-redirection.js';
import * as ClientError from './http-client-error.js';
import * as ServerError from './http-server-error.js';
export declare class UnknownHTTPStatusError extends Error {
name: string;
constructor(code: number);
}
export declare function fromCode(code: 100): Informational.Continue;
export declare function fromCode(code: 101): Informational.SwitchingProtocol;
export declare function fromCode(code: 102): Informational.Processing;
export declare function fromCode(code: 103): Informational.EarlyHints;
export declare function fromCode(code: 200): Successful.OK;
export declare function fromCode(code: 201): Successful.Created;
export declare function fromCode(code: 202): Successful.Accepted;
export declare function fromCode(code: 203): Successful.NonAuthoritativeInformation;
export declare function fromCode(code: 204): Successful.NoContent;
export declare function fromCode(code: 205): Successful.ResetContent;
export declare function fromCode(code: 206): Successful.PartialContent;
export declare function fromCode(code: 207): Successful.MultiStatus;
export declare function fromCode(code: 208): Successful.AlreadyReported;
export declare function fromCode(code: 226): Successful.IMUsed;
export declare function fromCode(code: 300): Redirection.MultipleChoice;
export declare function fromCode(code: 301): Redirection.MovedPermanently;
export declare function fromCode(code: 302): Redirection.Found;
export declare function fromCode(code: 303): Redirection.SeeOther;
export declare function fromCode(code: 304): Redirection.NotModified;
export declare function fromCode(code: 307): Redirection.TemporaryRedirect;
export declare function fromCode(code: 308): Redirection.PermanentRedirect;
export declare function fromCode(code: 400, message?: string): ClientError.BadRequest;
export declare function fromCode(code: 401, message?: string): ClientError.Unauthorized;
export declare function fromCode(code: 403, message?: string): ClientError.Forbidden;
export declare function fromCode(code: 404, message?: string): ClientError.NotFound;
export declare function fromCode(code: 405, message?: string): ClientError.MethodNotAllowed;
export declare function fromCode(code: 406, message?: string): ClientError.NotAcceptable;
export declare function fromCode(code: 407, message?: string): ClientError.ProxyAuthenticationRequired;
export declare function fromCode(code: 408, message?: string): ClientError.RequestTimeout;
export declare function fromCode(code: 409, message?: string): ClientError.Conflict;
export declare function fromCode(code: 410, message?: string): ClientError.Gone;
export declare function fromCode(code: 411, message?: string): ClientError.LengthRequired;
export declare function fromCode(code: 412, message?: string): ClientError.PreconditionFailed;
export declare function fromCode(code: 413, message?: string): ClientError.PayloadTooLarge;
export declare function fromCode(code: 414, message?: string): ClientError.URITooLong;
export declare function fromCode(code: 415, message?: string): ClientError.UnsupportedMediaType;
export declare function fromCode(code: 416, message?: string): ClientError.RangeNotSatisfiable;
export declare function fromCode(code: 417, message?: string): ClientError.ExpectationFailed;
export declare function fromCode(code: 421, message?: string): ClientError.MisdirectedRequest;
export declare function fromCode(code: 422, message?: string): ClientError.UnprocessableEntity;
export declare function fromCode(code: 423, message?: string): ClientError.Locked;
export declare function fromCode(code: 424, message?: string): ClientError.FailedDependency;
export declare function fromCode(code: 426, message?: string): ClientError.UpgradeRequired;
export declare function fromCode(code: 428, message?: string): ClientError.PreconditionRequired;
export declare function fromCode(code: 429, message?: string): ClientError.TooManyRequests;
export declare function fromCode(code: 431, message?: string): ClientError.RequestHeaderFieldsTooLarge;
export declare function fromCode(code: 451, message?: string): ClientError.UnavailableForLegalReasons;
export declare function fromCode(code: 500, message?: string): ServerError.InternalServerError;
export declare function fromCode(code: 501, message?: string): ServerError.NotImplemented;
export declare function fromCode(code: 502, message?: string): ServerError.BadGateway;
export declare function fromCode(code: 503, message?: string): ServerError.ServiceUnavailable;
export declare function fromCode(code: 504, message?: string): ServerError.GatewayTimeout;
export declare function fromCode(code: 505, message?: string): ServerError.HTTPVersionNotSupported;
export declare function fromCode(code: 506, message?: string): ServerError.VariantAlsoNegotiates;
export declare function fromCode(code: 507, message?: string): ServerError.InsufficientStorage;
export declare function fromCode(code: 508, message?: string): ServerError.LoopDetected;
export declare function fromCode(code: 510, message?: string): ServerError.NotExtended;
export declare function fromCode(code: 511, message?: string): ServerError.NetworkAuthenticationRequired;
export declare function fromCode(code: number, message?: string): HTTPStatus;