diff options
author | Kyomotoi <[email protected]> | 2022-02-18 00:44:55 +0800 |
---|---|---|
committer | Kyomotoi <[email protected]> | 2022-02-18 00:44:55 +0800 |
commit | f0bd8413c0ec7511e5357e3fed430891c1674cbe (patch) | |
tree | 92575e30b355c5f018c4f1f9edd0d9638c3bade5 /ATRI | |
parent | 8b4aa65495d98cfd244153824f5962ac71951cca (diff) | |
download | ATRI-f0bd8413c0ec7511e5357e3fed430891c1674cbe.tar.gz ATRI-f0bd8413c0ec7511e5357e3fed430891c1674cbe.tar.bz2 ATRI-f0bd8413c0ec7511e5357e3fed430891c1674cbe.zip |
🧑💻 提升debug体验
Diffstat (limited to 'ATRI')
-rw-r--r-- | ATRI/utils/request.py | 3 |
1 files changed, 3 insertions, 0 deletions
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) |