v1.1.28: HttpClient.get() resilient to empty body — return {} instead of JSONDecodeError

This commit is contained in:
2026-07-29 13:32:17 +04:00
parent edb2d0d526
commit 5af8c5218f
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -86,6 +86,8 @@ class HttpClient:
kwargs.setdefault("timeout", 10)
r = self._session.get(f"{self._endpoint}{path}", **kwargs)
r.raise_for_status()
if not r.text or not r.text.strip():
return {} # пустой ответ (напр. validate-cfs успех)
return r.json()
def post(self, path, data=None, **kwargs):