class documentation

class codes(IntEnum): (source)

View In Hierarchy

HTTP status codes and reason phrases Status codes from the following RFCs are all observed: * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 * RFC 6585: Additional HTTP Status Codes * RFC 3229: Delta encoding in HTTP * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 * RFC 5842: Binding Extensions to WebDAV * RFC 7238: Permanent Redirect * RFC 2295: Transparent Content Negotiation in HTTP * RFC 2774: An HTTP Extension Framework * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) * RFC 7725: An HTTP Status Code to Report Legal Obstacles * RFC 8297: An HTTP Status Code for Indicating Hints * RFC 8470: Using Early Data in HTTP

Class Method get_reason_phrase Undocumented
Class Method is_client_error Returns `True` for 4xx status codes, `False` otherwise.
Class Method is_error Returns `True` for 4xx or 5xx status codes, `False` otherwise.
Class Method is_informational Returns `True` for 1xx status codes, `False` otherwise.
Class Method is_redirect Returns `True` for 3xx status codes, `False` otherwise.
Class Method is_server_error Returns `True` for 5xx status codes, `False` otherwise.
Class Method is_success Returns `True` for 2xx status codes, `False` otherwise.
Method __new__ Undocumented
Method __str__ Undocumented
Constant ACCEPTED Undocumented
Constant ALREADY_REPORTED Undocumented
Constant BAD_GATEWAY Undocumented
Constant BAD_REQUEST Undocumented
Constant CONFLICT Undocumented
Constant CONTINUE Undocumented
Constant CREATED Undocumented
Constant EARLY_HINTS Undocumented
Constant EXPECTATION_FAILED Undocumented
Constant FAILED_DEPENDENCY Undocumented
Constant FORBIDDEN Undocumented
Constant FOUND Undocumented
Constant GATEWAY_TIMEOUT Undocumented
Constant GONE Undocumented
Constant HTTP_VERSION_NOT_SUPPORTED Undocumented
Constant IM_A_TEAPOT Undocumented
Constant IM_USED Undocumented
Constant INSUFFICIENT_STORAGE Undocumented
Constant INTERNAL_SERVER_ERROR Undocumented
Constant LENGTH_REQUIRED Undocumented
Constant LOCKED Undocumented
Constant LOOP_DETECTED Undocumented
Constant METHOD_NOT_ALLOWED Undocumented
Constant MISDIRECTED_REQUEST Undocumented
Constant MOVED_PERMANENTLY Undocumented
Constant MULTI_STATUS Undocumented
Constant MULTIPLE_CHOICES Undocumented
Constant NETWORK_AUTHENTICATION_REQUIRED Undocumented
Constant NO_CONTENT Undocumented
Constant NON_AUTHORITATIVE_INFORMATION Undocumented
Constant NOT_ACCEPTABLE Undocumented
Constant NOT_EXTENDED Undocumented
Constant NOT_FOUND Undocumented
Constant NOT_IMPLEMENTED Undocumented
Constant NOT_MODIFIED Undocumented
Constant OK Undocumented
Constant PARTIAL_CONTENT Undocumented
Constant PAYMENT_REQUIRED Undocumented
Constant PERMANENT_REDIRECT Undocumented
Constant PRECONDITION_FAILED Undocumented
Constant PRECONDITION_REQUIRED Undocumented
Constant PROCESSING Undocumented
Constant PROXY_AUTHENTICATION_REQUIRED Undocumented
Constant REQUEST_ENTITY_TOO_LARGE Undocumented
Constant REQUEST_HEADER_FIELDS_TOO_LARGE Undocumented
Constant REQUEST_TIMEOUT Undocumented
Constant REQUEST_URI_TOO_LONG Undocumented
Constant REQUESTED_RANGE_NOT_SATISFIABLE Undocumented
Constant RESET_CONTENT Undocumented
Constant SEE_OTHER Undocumented
Constant SERVICE_UNAVAILABLE Undocumented
Constant SWITCHING_PROTOCOLS Undocumented
Constant TEMPORARY_REDIRECT Undocumented
Constant TOO_EARLY Undocumented
Constant TOO_MANY_REQUESTS Undocumented
Constant UNAUTHORIZED Undocumented
Constant UNAVAILABLE_FOR_LEGAL_REASONS Undocumented
Constant UNPROCESSABLE_ENTITY Undocumented
Constant UNSUPPORTED_MEDIA_TYPE Undocumented
Constant UPGRADE_REQUIRED Undocumented
Constant USE_PROXY Undocumented
Constant VARIANT_ALSO_NEGOTIATES Undocumented
@classmethod
def get_reason_phrase(cls, value): (source)

Undocumented

Parameters
value:intUndocumented
Returns
strUndocumented
@classmethod
def is_client_error(cls, value): (source)

Returns `True` for 4xx status codes, `False` otherwise.

Parameters
value:intUndocumented
Returns
boolUndocumented
@classmethod
def is_error(cls, value): (source)

Returns `True` for 4xx or 5xx status codes, `False` otherwise.

Parameters
value:intUndocumented
Returns
boolUndocumented
@classmethod
def is_informational(cls, value): (source)

Returns `True` for 1xx status codes, `False` otherwise.

Parameters
value:intUndocumented
Returns
boolUndocumented
@classmethod
def is_redirect(cls, value): (source)

Returns `True` for 3xx status codes, `False` otherwise.

Parameters
value:intUndocumented
Returns
boolUndocumented
@classmethod
def is_server_error(cls, value): (source)

Returns `True` for 5xx status codes, `False` otherwise.

Parameters
value:intUndocumented
Returns
boolUndocumented
@classmethod
def is_success(cls, value): (source)

Returns `True` for 2xx status codes, `False` otherwise.

Parameters
value:intUndocumented
Returns
boolUndocumented
def __new__(cls, value, phrase=''): (source)

Undocumented

Parameters
clsUndocumented
value:intUndocumented
phrase:strUndocumented
Returns
codesUndocumented
def __str__(self): (source)

Undocumented

Returns
strUndocumented

Undocumented

Value
(202, 'Accepted')
ALREADY_REPORTED: tuple = (source)

Undocumented

Value
(208, 'Already Reported')
BAD_GATEWAY: tuple = (source)

Undocumented

Value
(502, 'Bad Gateway')
BAD_REQUEST: tuple = (source)

Undocumented

Value
(400, 'Bad Request')

Undocumented

Value
(409, 'Conflict')

Undocumented

Value
(100, 'Continue')

Undocumented

Value
(201, 'Created')
EARLY_HINTS: tuple = (source)

Undocumented

Value
(103, 'Early Hints')
EXPECTATION_FAILED: tuple = (source)

Undocumented

Value
(417, 'Expectation Failed')
FAILED_DEPENDENCY: tuple = (source)

Undocumented

Value
(424, 'Failed Dependency')
FORBIDDEN: tuple = (source)

Undocumented

Value
(403, 'Forbidden')

Undocumented

Value
(302, 'Found')
GATEWAY_TIMEOUT: tuple = (source)

Undocumented

Value
(504, 'Gateway Timeout')

Undocumented

Value
(410, 'Gone')
HTTP_VERSION_NOT_SUPPORTED: tuple = (source)

Undocumented

Value
(505, 'HTTP Version Not Supported')
IM_A_TEAPOT: tuple = (source)

Undocumented

Value
(418, 'I\'m a teapot')

Undocumented

Value
(226, 'IM Used')
INSUFFICIENT_STORAGE: tuple = (source)

Undocumented

Value
(507, 'Insufficient Storage')
INTERNAL_SERVER_ERROR: tuple = (source)

Undocumented

Value
(500, 'Internal Server Error')
LENGTH_REQUIRED: tuple = (source)

Undocumented

Value
(411, 'Length Required')

Undocumented

Value
(423, 'Locked')
LOOP_DETECTED: tuple = (source)

Undocumented

Value
(508, 'Loop Detected')
METHOD_NOT_ALLOWED: tuple = (source)

Undocumented

Value
(405, 'Method Not Allowed')
MISDIRECTED_REQUEST: tuple = (source)

Undocumented

Value
(421, 'Misdirected Request')
MOVED_PERMANENTLY: tuple = (source)

Undocumented

Value
(301, 'Moved Permanently')
MULTI_STATUS: tuple = (source)

Undocumented

Value
(207, 'Multi-Status')
MULTIPLE_CHOICES: tuple = (source)

Undocumented

Value
(300, 'Multiple Choices')
NETWORK_AUTHENTICATION_REQUIRED: tuple = (source)

Undocumented

Value
(511, 'Network Authentication Required')
NO_CONTENT: tuple = (source)

Undocumented

Value
(204, 'No Content')
NON_AUTHORITATIVE_INFORMATION: tuple = (source)

Undocumented

Value
(203, 'Non-Authoritative Information')
NOT_ACCEPTABLE: tuple = (source)

Undocumented

Value
(406, 'Not Acceptable')
NOT_EXTENDED: tuple = (source)

Undocumented

Value
(510, 'Not Extended')
NOT_FOUND: tuple = (source)

Undocumented

Value
(404, 'Not Found')
NOT_IMPLEMENTED: tuple = (source)

Undocumented

Value
(501, 'Not Implemented')
NOT_MODIFIED: tuple = (source)

Undocumented

Value
(304, 'Not Modified')

Undocumented

Value
(200, 'OK')
PARTIAL_CONTENT: tuple = (source)

Undocumented

Value
(206, 'Partial Content')
PAYMENT_REQUIRED: tuple = (source)

Undocumented

Value
(402, 'Payment Required')
PERMANENT_REDIRECT: tuple = (source)

Undocumented

Value
(308, 'Permanent Redirect')
PRECONDITION_FAILED: tuple = (source)

Undocumented

Value
(412, 'Precondition Failed')
PRECONDITION_REQUIRED: tuple = (source)

Undocumented

Value
(428, 'Precondition Required')
PROCESSING: tuple = (source)

Undocumented

Value
(102, 'Processing')
PROXY_AUTHENTICATION_REQUIRED: tuple = (source)

Undocumented

Value
(407, 'Proxy Authentication Required')
REQUEST_ENTITY_TOO_LARGE: tuple = (source)

Undocumented

Value
(413, 'Request Entity Too Large')
REQUEST_HEADER_FIELDS_TOO_LARGE: tuple = (source)

Undocumented

Value
(431, 'Request Header Fields Too Large')
REQUEST_TIMEOUT: tuple = (source)

Undocumented

Value
(408, 'Request Timeout')
REQUEST_URI_TOO_LONG: tuple = (source)

Undocumented

Value
(414, 'Request-URI Too Long')
REQUESTED_RANGE_NOT_SATISFIABLE: tuple = (source)

Undocumented

Value
(416, 'Requested Range Not Satisfiable')
RESET_CONTENT: tuple = (source)

Undocumented

Value
(205, 'Reset Content')
SEE_OTHER: tuple = (source)

Undocumented

Value
(303, 'See Other')
SERVICE_UNAVAILABLE: tuple = (source)

Undocumented

Value
(503, 'Service Unavailable')
SWITCHING_PROTOCOLS: tuple = (source)

Undocumented

Value
(101, 'Switching Protocols')
TEMPORARY_REDIRECT: tuple = (source)

Undocumented

Value
(307, 'Temporary Redirect')
TOO_EARLY: tuple = (source)

Undocumented

Value
(425, 'Too Early')
TOO_MANY_REQUESTS: tuple = (source)

Undocumented

Value
(429, 'Too Many Requests')
UNAUTHORIZED: tuple = (source)

Undocumented

Value
(401, 'Unauthorized')
UNAVAILABLE_FOR_LEGAL_REASONS: tuple = (source)

Undocumented

Value
(451, 'Unavailable For Legal Reasons')
UNPROCESSABLE_ENTITY: tuple = (source)

Undocumented

Value
(422, 'Unprocessable Entity')
UNSUPPORTED_MEDIA_TYPE: tuple = (source)

Undocumented

Value
(415, 'Unsupported Media Type')
UPGRADE_REQUIRED: tuple = (source)

Undocumented

Value
(426, 'Upgrade Required')
USE_PROXY: tuple = (source)

Undocumented

Value
(305, 'Use Proxy')
VARIANT_ALSO_NEGOTIATES: tuple = (source)

Undocumented

Value
(506, 'Variant Also Negotiates')