8000 Merge pull request #71 from khrigo/patch-1 · flask-api/flask-api@f6b674e · GitHub
[go: up one dir, main page]

Skip to content

Commit f6b674e

Browse files
authored
Merge pull request #71 from khrigo/patch-1
Add other HTTP status codes
2 parents 846ce86 + d8c3e4d commit f6b674e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

flask_api/status.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def is_server_error(code):
3939
HTTP_204_NO_CONTENT = 204
4040
HTTP_205_RESET_CONTENT = 205
4141
HTTP_206_PARTIAL_CONTENT = 206
42+
HTTP_207_MULTI_STATUS = 207
4243
HTTP_300_MULTIPLE_CHOICES = 300
4344
HTTP_301_MOVED_PERMANENTLY = 301
4445
HTTP_302_FOUND = 302
@@ -47,6 +48,7 @@ def is_server_error(code):
4748
HTTP_305_USE_PROXY = 305
4849
HTTP_306_RESERVED = 306
4950
HTTP_307_TEMPORARY_REDIRECT = 307
51+
HTTP_308_PERMANENT_REDIRECT = 308
5052
HTTP_400_BAD_REQUEST = 400
5153
HTTP_401_UNAUTHORIZED = 401
5254
HTTP_402_PAYMENT_REQUIRED = 402
@@ -68,10 +70,13 @@ def is_server_error(code):
6870
HTTP_428_PRECONDITION_REQUIRED = 428
6971
HTTP_429_TOO_MANY_REQUESTS = 429
7072
HTTP_431_REQUEST_HEADER_FIELDS_TOO_LARGE = 431
73+
HTTP_444_CONNECTION_CLOSED_WITHOUT_RESPONSE = 444
7174
HTTP_500_INTERNAL_SERVER_ERROR = 500
7275
HTTP_501_NOT_IMPLEMENTED = 501
7376
HTTP_502_BAD_GATEWAY = 502
7477
HTTP_503_SERVICE_UNAVAILABLE = 503
7578
HTTP_504_GATEWAY_TIMEOUT = 504
7679
HTTP_505_HTTP_VERSION_NOT_SUPPORTED = 505
80+
HTTP_508_LOOP_DETECTED = 508
81+
HTTP_510_NOT_EXTENDED = 510
7782
HTTP_511_NETWORK_AUTHENTICATION_REQUIRED = 511

0 commit comments

Comments
 (0)
0