Skip to content
Myr

Additional HTTP Status Codes 418, 451 (#135)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Stephen Brown II · committed by Seth Michael Larson · parent edd7029 · Browse files · 1 file+4 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−0 removed

  • other:+4 added−0 removed

1 file+4 added−0 removed

modified:httpx/status_codes.py+4 added
11 unmodified lines
12 * RFC 7238: Permanent Redirect13 * RFC 2295: Transparent Content Negotiation in HTTP14 * RFC 2774: An HTTP Extension Framework15 * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2)16 * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)17 * RFC 7725: An HTTP Status Code to Report Legal Obstacles18 """1920 def __new__(cls, value: int, phrase: str = "") -> "StatusCode":21 obj = int.__new__(cls, value) # type: ignore
80 unmodified lines
102 REQUEST_URI_TOO_LONG = 414, "Request-URI Too Long"103 UNSUPPORTED_MEDIA_TYPE = 415, "Unsupported Media Type"104 REQUESTED_RANGE_NOT_SATISFIABLE = 416, "Requested Range Not Satisfiable"105 EXPECTATION_FAILED = 417, "Expectation Failed"106 IM_A_TEAPOT = 418, "I'm a teapot"107 MISDIRECTED_REQUEST = 421, "Misdirected Request"108 UNPROCESSABLE_ENTITY = 422, "Unprocessable Entity"109 LOCKED = 423, "Locked"110 FAILED_DEPENDENCY = 424, "Failed Dependency"111 UPGRADE_REQUIRED = 426, "Upgrade Required"112 PRECONDITION_REQUIRED = 428, "Precondition Required"113 TOO_MANY_REQUESTS = 429, "Too Many Requests"114 REQUEST_HEADER_FIELDS_TOO_LARGE = 431, "Request Header Fields Too Large"115 UNAVAILABLE_FOR_LEGAL_REASONS = 451, "Unavailable For Legal Reasons"116117 # server errors118 INTERNAL_SERVER_ERROR = 500, "Internal Server Error"119 NOT_IMPLEMENTED = 501, "Not Implemented"
16 unmodified lines