8000 Add Multiple HTTP Statuses (#6706) · coderanger/django-rest-framework@6bd25c0 · GitHub
[go: up one dir, main page]

Skip to content 65F2

Commit 6bd25c0

Browse files
FlorianWendelbornrpkilby
authored andcommitted
Add Multiple HTTP Statuses (encode#6706)
1 parent 8430f3e commit 6bd25c0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

rest_framework/status.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ def is_server_error(code):
3737
HTTP_205_RESET_CONTENT = 205
3838
HTTP_206_PARTIAL_CONTENT = 206
3939
HTTP_207_MULTI_STATUS = 207
40+
HTTP_208_ALREADY_REPORTED = 208
41+
HTTP_226_IM_USED = 226
4042
HTTP_300_MULTIPLE_CHOICES = 300
4143
HTTP_301_MOVED_PERMANENTLY = 301
4244
HTTP_302_FOUND = 302
@@ -67,6 +69,7 @@ def is_server_error(code):
6769
HTTP_422_UNPROCESSABLE_ENTITY = 422
6870
HTTP_423_LOCKED = 423
6971
HTTP_424_FAILED_DEPENDENCY = 424
72+
HTTP_426_UPGRADE_REQUIRED = 426
7073
HTTP_428_PRECONDITION_REQUIRED = 428
7174
HTTP_429_TOO_MANY_REQUESTS = 429
7275
HTTP_431_REQUEST_HEADER_FIELDS_TOO_LARGE = 431
@@ -77,5 +80,9 @@ def is_server_error(code):
7780
HTTP_503_SERVICE_UNAVAILABLE = 503
7881
HTTP_504_GATEWAY_TIMEOUT = 504
7982
HTTP_505_HTTP_VERSION_NOT_SUPPORTED = 505
83+
HTTP_506_VARIANT_ALSO_NEGOTIATES = 506
8084
HTTP_507_INSUFFICIENT_STORAGE = 507
85+
HTTP_508_LOOP_DETECTED = 508
86+
HTTP_509_BANDWIDTH_LIMIT_EXCEEDED = 509
87+
HTTP_510_NOT_EXTENDED = 510
8188
HTTP_511_NETWORK_AUTHENTICATION_REQUIRED = 511

0 commit comments

Comments
 (0)
0