summaryrefslogtreecommitdiff
path: root/ATRI/utils/request.py
diff options
context:
space:
mode:
Diffstat (limited to 'ATRI/utils/request.py')
-rw-r--r--ATRI/utils/request.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/ATRI/utils/request.py b/ATRI/utils/request.py
index 2cfce85..da0cdd4 100644
--- a/ATRI/utils/request.py
+++ b/ATRI/utils/request.py
@@ -2,16 +2,17 @@ import httpx
from ATRI.config import BotSelfConfig
-proxy = BotSelfConfig.proxy
-if not proxy:
+if not BotSelfConfig.proxy:
proxy = dict()
+else:
+ proxy = {"all://": BotSelfConfig.proxy}
async def get(url: str, **kwargs):
- async with httpx.AsyncClient(proxies=proxy) as client:
+ async with httpx.AsyncClient(proxies=proxy) as client: # type: ignore
return await client.get(url, **kwargs)
async def post(url: str, **kwargs):
- async with httpx.AsyncClient(proxies=proxy) as client:
+ async with httpx.AsyncClient(proxies=proxy) as client: # type: ignore
return await client.post(url, **kwargs)