File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,7 +35,9 @@ async def request_get(url: str):
3535 Response: A Response object.
3636 """
3737 response = None
38- async with httpx .AsyncClient () as client :
38+ # Explicitly ignore env proxies; k8s envs often inject HTTP(S)_PROXY which can
39+ # return 503 from the proxy rather than the upstream service.
40+ async with httpx .AsyncClient (trust_env = False ) as client :
3941 try :
4042 response = await client .get (url , timeout = REQUEST_TIMEOUT )
4143 except httpx .TimeoutException :
@@ -53,7 +55,7 @@ async def request_get(url: str):
5355
5456async def request_post (url : str , data ):
5557 response = None
56- async with httpx .AsyncClient () as client :
58+ async with httpx .AsyncClient (trust_env = False ) as client :
5759 try :
5860 response = await client .post (url , timeout = REQUEST_TIMEOUT , data = data )
5961 except httpx .TimeoutException :
Original file line number Diff line number Diff line change 11[loggers]
2- keys=root
2+ keys=root, httpx
3+
4+ [logger_httpx]
5+ level=CRITICAL
6+ handlers=consoleHandler
7+ qualname=httpx
38
49[handlers]
510keys=consoleHandler,detailedConsoleHandler
You can’t perform that action at this time.
0 commit comments