From f0bd8413c0ec7511e5357e3fed430891c1674cbe Mon Sep 17 00:00:00 2001 From: Kyomotoi Date: Fri, 18 Feb 2022 00:44:55 +0800 Subject: =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20=E6=8F=90=E5=8D=87d?= =?UTF-8?q?ebug=E4=BD=93=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ATRI/utils/request.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ATRI/utils') diff --git a/ATRI/utils/request.py b/ATRI/utils/request.py index da0cdd4..0b43576 100644 --- a/ATRI/utils/request.py +++ b/ATRI/utils/request.py @@ -1,5 +1,6 @@ import httpx from ATRI.config import BotSelfConfig +from ATRI.log import logger as log if not BotSelfConfig.proxy: @@ -9,10 +10,12 @@ else: async def get(url: str, **kwargs): + log.debug(f"GET {url} by {proxy if proxy else 'No proxy'} | MORE: \n {kwargs}") async with httpx.AsyncClient(proxies=proxy) as client: # type: ignore return await client.get(url, **kwargs) async def post(url: str, **kwargs): + log.debug(f"POST {url} by {proxy if proxy else 'No proxy'} | MORE: \n {kwargs}") async with httpx.AsyncClient(proxies=proxy) as client: # type: ignore return await client.post(url, **kwargs) -- cgit v1.2.3