GitHub

API reference for status.

HTTP status codes by name (Effect's HttpStatus).

Values

AttributeTypeDescription
CODE_BY_LITERALFinal[dict[StatusLiteral, int]] = {'Continue': 100, 'SwitchingProtocols': 101, 'Processing': 102, 'EarlyHints': 103, 'OK': 200, 'Ok': 200, 'Created': 201, 'Accepted': 202, 'NonAuthoritativeInformation': 203, 'NoContent': 204, 'ResetContent': 205, 'PartialContent': 206, 'MultiStatus': 207, 'AlreadyReported': 208, 'ImUsed': 226, 'MultipleChoices': 300, 'MovedPermanently': 301, 'Found': 302, 'SeeOther': 303, 'NotModified': 304, 'TemporaryRedirect': 307, 'PermanentRedirect': 308, 'BadRequest': 400, 'Unauthorized': 401, 'PaymentRequired': 402, 'Forbidden': 403, 'NotFound': 404, 'MethodNotAllowed': 405, 'NotAcceptable': 406, 'ProxyAuthenticationRequired': 407, 'RequestTimeout': 408, 'Conflict': 409, 'Gone': 410, 'LengthRequired': 411, 'PreconditionFailed': 412, 'PayloadTooLarge': 413, 'UriTooLong': 414, 'UnsupportedMediaType': 415, 'RangeNotSatisfiable': 416, 'ExpectationFailed': 417, 'ImATeapot': 418, 'MisdirectedRequest': 421, 'UnprocessableEntity': 422, 'Locked': 423, 'FailedDependency': 424, 'TooEarly': 425, 'UpgradeRequired': 426, 'PreconditionRequired': 428, 'TooManyRequests': 429, 'RequestHeaderFieldsTooLarge': 431, 'UnavailableForLegalReasons': 451, 'InternalServerError': 500, 'NotImplemented': 501, 'BadGateway': 502, 'ServiceUnavailable': 503, 'GatewayTimeout': 504, 'HttpVersionNotSupported': 505, 'VariantAlsoNegotiates': 506, 'InsufficientStorage': 507, 'LoopDetected': 508, 'NotExtended': 510, 'NetworkAuthenticationRequired': 511}

Types

TypeDefinitionDescription
StatusLiteraltype StatusLiteral = Literal['Continue', 'SwitchingProtocols', 'Processing', 'EarlyHints', 'OK', 'Ok', 'Created', 'Accepted', 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', 'PartialContent', 'MultiStatus', 'AlreadyReported', 'ImUsed', 'MultipleChoices', 'MovedPermanently', 'Found', 'SeeOther', 'NotModified', 'TemporaryRedirect', 'PermanentRedirect', 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', 'PreconditionFailed', 'PayloadTooLarge', 'UriTooLong', 'UnsupportedMediaType', 'RangeNotSatisfiable', 'ExpectationFailed', 'ImATeapot', 'MisdirectedRequest', 'UnprocessableEntity', 'Locked', 'FailedDependency', 'TooEarly', 'UpgradeRequired', 'PreconditionRequired', 'TooManyRequests', 'RequestHeaderFieldsTooLarge', 'UnavailableForLegalReasons', 'InternalServerError', 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', 'HttpVersionNotSupported', 'VariantAlsoNegotiates', 'InsufficientStorage', 'LoopDetected', 'NotExtended', 'NetworkAuthenticationRequired']

Functions

from_literal

from_literal(literal) -> int

The status code named literal ("NotFound" is 404).

ParameterTypeDescription
literalStatusLiteral

Returns int

def from_literal(literal: StatusLiteral) -> int:
    """The status code named ``literal`` (``"NotFound"`` is 404)."""
    return CODE_BY_LITERAL[literal]