Skip to content

Instantly share code, notes, and snippets.

@ngnam
Created May 19, 2021 11:20
Show Gist options
  • Save ngnam/fa2838ff336269c382d8866a2d02e47b to your computer and use it in GitHub Desktop.
Save ngnam/fa2838ff336269c382d8866a2d02e47b to your computer and use it in GitHub Desktop.
http-statuscodes.ts
import { Injectable } from "@angular/core";
/**
* A collection of constants for HTTP status codes. Status Codes listed at http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
*/
@Injectable({ providedIn: 'root' })
export class StatusCodes {
//
// Summary:
// HTTP status code 100.
public readonly Status100Continue = 100;
//
// Summary:
// HTTP status code 412.
public readonly Status412PreconditionFailed = 412;
//
// Summary:
// HTTP status code 413.
public readonly Status413RequestEntityTooLarge = 413;
//
// Summary:
// HTTP status code 413.
public readonly Status413PayloadTooLarge = 413;
//
// Summary:
// HTTP status code 414.
public readonly Status414RequestUriTooLong = 414;
//
// Summary:
// HTTP status code 414.
public readonly Status414UriTooLong = 414;
//
// Summary:
// HTTP status code 415.
public readonly Status415UnsupportedMediaType = 415;
//
// Summary:
// HTTP status code 416.
public readonly Status416RequestedRangeNotSatisfiable = 416;
//
// Summary:
// HTTP status code 416.
public readonly Status416RangeNotSatisfiable = 416;
//
// Summary:
// HTTP status code 417.
public readonly Status417ExpectationFailed = 417;
//
// Summary:
// HTTP status code 418.
public readonly Status418ImATeapot = 418;
//
// Summary:
// HTTP status code 419.
public readonly Status419AuthenticationTimeout = 419;
//
// Summary:
// HTTP status code 422.
public readonly Status421MisdirectedRequest = 421;
//
// Summary:
// HTTP status code 422.
public readonly Status422UnprocessableEntity = 422;
//
// Summary:
// HTTP status code 423.
public readonly Status423Locked = 423;
//
// Summary:
// HTTP status code 424.
public readonly Status424FailedDependency = 424;
//
// Summary:
// HTTP status code 426.
public readonly Status426UpgradeRequired = 426;
//
// Summary:
// HTTP status code 428.
public readonly Status428PreconditionRequired = 428;
//
// Summary:
// HTTP status code 429.
public readonly Status429TooManyRequests = 429;
//
// Summary:
// HTTP status code 431.
public readonly Status431RequestHeaderFieldsTooLarge = 431;
//
// Summary:
// HTTP status code 451.
public readonly Status451UnavailableForLegalReasons = 451;
//
// Summary:
// HTTP status code 500.
public readonly Status500InternalServerError = 500;
//
// Summary:
// HTTP status code 501.
public readonly Status501NotImplemented = 501;
//
// Summary:
// HTTP status code 502.
public readonly Status502BadGateway = 502;
//
// Summary:
// HTTP status code 503.
public readonly Status503ServiceUnavailable = 503;
//
// Summary:
// HTTP status code 504.
public readonly Status504GatewayTimeout = 504;
//
// Summary:
// HTTP status code 505.
public readonly Status505HttpVersionNotsupported = 505;
//
// Summary:
// HTTP status code 506.
public readonly Status506VariantAlsoNegotiates = 506;
//
// Summary:
// HTTP status code 507.
public readonly Status507InsufficientStorage = 507;
//
// Summary:
// HTTP status code 508.
public readonly Status508LoopDetected = 508;
//
// Summary:
// HTTP status code 411.
public readonly Status411LengthRequired = 411;
//
// Summary:
// HTTP status code 510.
public readonly Status510NotExtended = 510;
//
// Summary:
// HTTP status code 410.
public readonly Status410Gone = 410;
//
// Summary:
// HTTP status code 408.
public readonly Status408RequestTimeout = 408;
//
// Summary:
// HTTP status code 101.
public readonly Status101SwitchingProtocols = 101;
//
// Summary:
// HTTP status code 102.
public readonly Status102Processing = 102;
//
// Summary:
// HTTP status code 200.
public readonly Status200OK = 200;
//
// Summary:
// HTTP status code 201.
public readonly Status201Created = 201;
//
// Summary:
// HTTP status code 202.
public readonly Status202Accepted = 202;
//
// Summary:
// HTTP status code 203.
public readonly Status203NonAuthoritative = 203;
//
// Summary:
// HTTP status code 204.
public readonly Status204NoContent = 204;
//
// Summary:
// HTTP status code 205.
public readonly Status205ResetContent = 205;
//
// Summary:
// HTTP status code 206.
public readonly Status206PartialContent = 206;
//
// Summary:
// HTTP status code 207.
public readonly Status207MultiStatus = 207;
//
// Summary:
// HTTP status code 208.
public readonly Status208AlreadyReported = 208;
//
// Summary:
// HTTP status code 226.
public readonly Status226IMUsed = 226;
//
// Summary:
// HTTP status code 300.
public readonly Status300MultipleChoices = 300;
//
// Summary:
// HTTP status code 301.
public readonly Status301MovedPermanently = 301;
//
// Summary:
// HTTP status code 302.
public readonly Status302Found = 302;
//
// Summary:
// HTTP status code 303.
public readonly Status303SeeOther = 303;
//
// Summary:
// HTTP status code 304.
public readonly Status304NotModified = 304;
//
// Summary:
// HTTP status code 305.
public readonly Status305UseProxy = 305;
//
// Summary:
// HTTP status code 306.
public readonly Status306SwitchProxy = 306;
//
// Summary:
// HTTP status code 307.
public readonly Status307TemporaryRedirect = 307;
//
// Summary:
// HTTP status code 308.
public readonly Status308PermanentRedirect = 308;
//
// Summary:
// HTTP status code 400.
public readonly Status400BadRequest = 400;
//
// Summary:
// HTTP status code 401.
public readonly Status401Unauthorized = 401;
//
// Summary:
// HTTP status code 402.
public readonly Status402PaymentRequired = 402;
//
// Summary:
// HTTP status code 403.
public readonly Status403Forbidden = 403;
//
// Summary:
// HTTP status code 404.
public readonly Status404NotFound = 404;
//
// Summary:
// HTTP status code 405.
public readonly Status405MethodNotAllowed = 405;
//
// Summary:
// HTTP status code 406.
public readonly Status406NotAcceptable = 406;
//
// Summary:
// HTTP status code 407.
public readonly Status407ProxyAuthenticationRequired = 407;
//
// Summary:
// HTTP status code 409.
public readonly Status409Conflict = 409;
//
// Summary:
// HTTP status code 511.
public readonly Status511NetworkAuthenticationRequired = 511;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment