mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 10:59:40 +00:00
Use http status constants more, add HTTP_ACCEPTED and HTTP_BAD_GATEWAY (#39993)
* Use http status codes and add HTTP_BAD_GATEWAY constant * Address review comments: - using constants in tado integration - using constant in media_player init.py * Add and use HTTP_ACCEPTED constant
This commit is contained in:
@@ -564,6 +564,7 @@ URL_API_TEMPLATE = "/api/template"
|
||||
|
||||
HTTP_OK = 200
|
||||
HTTP_CREATED = 201
|
||||
HTTP_ACCEPTED = 202
|
||||
HTTP_MOVED_PERMANENTLY = 301
|
||||
HTTP_BAD_REQUEST = 400
|
||||
HTTP_UNAUTHORIZED = 401
|
||||
@@ -573,6 +574,7 @@ HTTP_METHOD_NOT_ALLOWED = 405
|
||||
HTTP_UNPROCESSABLE_ENTITY = 422
|
||||
HTTP_TOO_MANY_REQUESTS = 429
|
||||
HTTP_INTERNAL_SERVER_ERROR = 500
|
||||
HTTP_BAD_GATEWAY = 502
|
||||
HTTP_SERVICE_UNAVAILABLE = 503
|
||||
|
||||
HTTP_BASIC_AUTHENTICATION = "basic"
|
||||
|
||||
Reference in New Issue
Block a user