Skip to content
Myr

status_codes.py

This file

Path

httpcore/status_codes.py

61 lines · 1.9 KiB · Python

Last changed by

Merge branch 'master' into wait-for-connection-closeTom Christiebefore adoption20bc1f3

History of this file

Take it

1import enum23codes = enum.IntEnum(4    "StatusCode",5    [6        ("continue", 100),7        ("switching_protocols", 101),8        ("processing", 102),9        ("ok", 200),10        ("created", 201),11        ("accepted", 202),12        ("non_authoritative_information", 203),13        ("no_content", 204),14        ("reset_content", 205),15        ("partial_content", 206),16        ("multi_status", 207),17        ("already_reported", 208),18        ("im_used", 226),19        ("multiple_choices", 300),20        ("moved_permanently", 301),21        ("found", 302),22        ("see_other", 303),23        ("not_modified", 304),24        ("use_proxy", 305),25        ("temporary_redirect", 307),26        ("permanent_redirect", 308),27        ("bad_request", 400),28        ("unauthorized", 401),29        ("payment_required", 402),30        ("forbidden", 403),31        ("not_found", 404),32        ("method_not_allowed", 405),33        ("not_acceptable", 406),34        ("proxy_authentication_required", 407),35        ("request_timeout", 408),36        ("conflict", 409),37        ("gone", 410),38        ("length_required", 411),39        ("precondition_failed", 412),40        ("request_entity_too_large", 413),41        ("request_uri_too_long", 414),42        ("unsupported_media_type", 415),43        ("requested_range_not_satisfiable", 416),44        ("expectation_failed", 417),45        ("unprocessable_entity", 422),46        ("locked", 423),47        ("failed_dependency", 424),48        ("precondition_required", 428),49        ("too_many_requests", 429),50        ("request_header_fields_too_large", 431),51        ("unavailable_for_legal_reasons", 451),52        ("internal_server_error", 500),53        ("not_implemented", 501),54        ("bad_gateway", 502),55        ("service_unavailable", 503),56        ("gateway_timeout", 504),57        ("http_version_not_supported", 505),58        ("insufficient_storage", 507),59        ("network_authentication_required", 511),60    ],61)