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:
parent
59d610af17
commit
db582bdc1b
32 changed files with 137 additions and 58 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue