taxum
    Preparing search index...

    Represents HTTP status codes along with their standard reason phrases.

    This class provides a set of constants corresponding to standard HTTP status codes, which are compliant with various RFC documents. It enables developers to use predefined instances for status codes and reason phrases, thus improving readability and reducing potential errors.

    The StatusCode class implements the ToHttpResponse interface, which may provide additional functionality when interacting with HTTP responses.

    Implements

    Index

    Properties

    code: number
    phrase: string
    ACCEPTED: StatusCode = ...
    ALREADY_REPORTED: StatusCode = ...

    208 Already Reported [RFC5842, Section 7.1]

    BAD_GATEWAY: StatusCode = ...

    502 Bad Gateway [RFC9110, Section 15.6.3]

    BAD_REQUEST: StatusCode = ...

    400 Bad Request [RFC9110, Section 15.5.1]

    CONFLICT: StatusCode = ...
    CONTENT_TOO_LARGE: StatusCode = ...

    413 Content Too Large [RFC9110, Section 15.5.14]

    CONTINUE: StatusCode = ...
    CREATED: StatusCode = ...
    EXPECTATION_FAILED: StatusCode = ...

    417 Expectation Failed [RFC9110, Section 15.5.18]

    FAILED_DEPENDENCY: StatusCode = ...

    424 Failed Dependency [RFC4918, Section 11.4]

    FORBIDDEN: StatusCode = ...
    FOUND: StatusCode = ...
    GATEWAY_TIMEOUT: StatusCode = ...

    504 Gateway Timeout [RFC9110, Section 15.6.5]

    GONE: StatusCode = ...
    HTTP_VERSION_NOT_SUPPORTED: StatusCode = ...

    505 HTTP Version Not Supported [RFC9110, Section 15.6.6]

    IM_A_TEAPOT: StatusCode = ...

    418 I'm a teapot [RFC7168]

    IM_USED: StatusCode = ...
    INSUFFICIENT_STORAGE: StatusCode = ...

    507 Insufficient Storage [RFC4918, Section 11.5]

    INTERNAL_SERVER_ERROR: StatusCode = ...

    500 Internal Server Error [RFC9110, Section 15.6.1]

    LENGTH_REQUIRED: StatusCode = ...

    411 Length Required [RFC9110, Section 15.5.12]

    LOCKED: StatusCode = ...
    LOOP_DETECTED: StatusCode = ...

    508 Loop Detected [RFC5842, Section 7.2]

    METHOD_NOT_ALLOWED: StatusCode = ...

    405 Method Not Allowed [RFC9110, Section 15.5.6]

    MISDIRECTED_REQUEST: StatusCode = ...

    421 Misdirected Request [RFC9110, Section 15.5.20]

    MOVED_PERMANENTLY: StatusCode = ...

    301 Moved Permanently [RFC9110, Section 15.4.2]

    MULTI_STATUS: StatusCode = ...

    207 Multi-Status [RFC4918, Section 11.1]

    MULTIPLE_CHOICES: StatusCode = ...

    300 Multiple Choices [RFC9110, Section 15.4.1]

    NETWORK_AUTHENTICATION_REQUIRED: StatusCode = ...

    511 Network Authentication Required [RFC6585, Section 6]

    NO_CONTENT: StatusCode = ...
    NON_AUTHORITATIVE_INFORMATION: StatusCode = ...

    203 Non-Authoritative Information [RFC9110, Section 15.3.4]

    NOT_ACCEPTABLE: StatusCode = ...

    406 Not Acceptable [RFC9110, Section 15.5.7]

    NOT_EXTENDED: StatusCode = ...

    510 Not Extended [RFC2774, Section 7]

    NOT_FOUND: StatusCode = ...
    NOT_IMPLEMENTED: StatusCode = ...

    501 Not Implemented [RFC9110, Section 15.6.2]

    NOT_MODIFIED: StatusCode = ...

    304 Not Modified [RFC9110, Section 15.4.5]

    OK: StatusCode = ...
    PARTIAL_CONTENT: StatusCode = ...

    206 Partial Content [RFC9110, Section 15.3.7]

    PAYMENT_REQUIRED: StatusCode = ...

    402 Payment Required [RFC9110, Section 15.5.3]

    PERMANENT_REDIRECT: StatusCode = ...

    308 Permanent Redirect [RFC9110, Section 15.4.8]

    PRECONDITION_FAILED: StatusCode = ...

    412 Precondition Failed [RFC9110, Section 15.5.13]

    PRECONDITION_REQUIRED: StatusCode = ...

    428 Precondition Required [RFC6585, Section 3]

    PROCESSING: StatusCode = ...

    102 Processing [RFC2518, Section 10.1]

    PROXY_AUTHENTICATION_REQUIRED: StatusCode = ...

    407 Proxy Authentication Required [RFC9110, Section 15.5.8]

    RANGE_NOT_SATISFIABLE: StatusCode = ...

    416 Range Not Satisfiable [RFC9110, Section 15.5.17]

    REQUEST_HEADER_FIELDS_TOO_LARGE: StatusCode = ...

    431 Request Header Fields Too Large [RFC6585, Section 5]

    REQUEST_TIMEOUT: StatusCode = ...

    408 Request Timeout [RFC9110, Section 15.5.9]

    RESET_CONTENT: StatusCode = ...

    205 Reset Content [RFC9110, Section 15.3.6]

    SEE_OTHER: StatusCode = ...
    SERVICE_UNAVAILABLE: StatusCode = ...

    503 Service Unavailable [RFC9110, Section 15.6.4]

    SWITCHING_PROTOCOLS: StatusCode = ...

    101 Switching Protocols [RFC9110, Section 15.2.2]

    TEMPORARY_REDIRECT: StatusCode = ...

    307 Temporary Redirect [RFC9110, Section 15.4.7]

    TOO_EARLY: StatusCode = ...

    425 Too Early [RFC8470, Section 5.2]

    TOO_MANY_REQUESTS: StatusCode = ...

    429 Too Many Requests [RFC6585, Section 4]

    UNAUTHORIZED: StatusCode = ...

    401 Unauthorized [RFC9110, Section 15.5.2]

    UNAVAILABLE_FOR_LEGAL_REASONS: StatusCode = ...

    451 Unavailable For Legal Reasons [RFC7725]

    UNPROCESSABLE_CONTENT: StatusCode = ...

    422 Unprocessable Content [RFC9110, Section 15.5.21]

    UNSUPPORTED_MEDIA_TYPE: StatusCode = ...

    415 Unsupported Media Type [RFC9110, Section 15.5.16]

    UPGRADE_REQUIRED: StatusCode = ...

    426 Upgrade Required [RFC9110, Section 15.5.22]

    URI_TOO_LONG: StatusCode = ...

    414 URI Too Long [RFC9110, Section 15.5.15]

    USE_PROXY: StatusCode = ...
    VARIANT_ALSO_NEGOTIATES: StatusCode = ...

    506 Variant Also Negotiates [RFC2295, Section 8.1]

    Methods

    • Determines if the current HTTP status code falls within the client error response range (400-499).

      Returns boolean

    • Determines if the current HTTP status code falls within the informational response range (100-199).

      Returns boolean

    • Determines if the current HTTP status code falls within the redirection response range (300-399).

      Returns boolean

    • Determines if the current HTTP status code falls within the server error response range (500-599).

      Returns boolean

    • Determines if the current HTTP status code falls within the success response range (200-299).

      Returns boolean

    • Returns a string representation of an object.

      Returns string

    • Converts a numeric code to its corresponding StatusCode.

      Parameters

      • code: number

      Returns StatusCode

      if the provided code is not defined in the code map.