From 2ce25ac5acab010c021bfb6ef8cb7aaca2b1dab3 Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Sun, 13 Feb 2022 11:18:29 +0100 Subject: [PATCH] json response --- backend/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/config.py b/backend/config.py index 3fea5d4..ebe7377 100644 --- a/backend/config.py +++ b/backend/config.py @@ -114,7 +114,7 @@ class ProxyElem: async with self.local() as session: resp = await session.post(proxy_server, json=request_data.dict()) response_data = cast( - ProxyResponse, ProxyResponse.parse_obj(await resp.text()) + ProxyResponse, ProxyResponse.parse_obj(await resp.json()) ) except (aiohttp.ClientError, pydantic.ValidationError) as e: logger.info(e)