From cdabce3148d9b855abe0715c70901a6fe1b768fe Mon Sep 17 00:00:00 2001 From: Kamil Sroka Date: Mon, 12 Aug 2024 19:44:08 +0200 Subject: [PATCH] Add user-agent header as some servers seems to be blocking requests with the default one --- toshiba_ac/utils/http_api.py | 1 + 1 file changed, 1 insertion(+) diff --git a/toshiba_ac/utils/http_api.py b/toshiba_ac/utils/http_api.py index eb4c89f..b1ea645 100644 --- a/toshiba_ac/utils/http_api.py +++ b/toshiba_ac/utils/http_api.py @@ -78,6 +78,7 @@ async def request_api( headers = {} headers["Content-Type"] = "application/json" headers["Authorization"] = self.access_token_type + " " + self.access_token + headers["User-Agent"] = "curl/7.64.0" url = self.BASE_URL + path