Skip to content

Commit

Permalink
feat: use ssl_verify value in httpx.AsyncClient
Browse files Browse the repository at this point in the history
Closes #16
  • Loading branch information
Ljzd-PRO committed Nov 29, 2023
1 parent 646e402 commit 9935b96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ktoolbox/api/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ async def request(cls, path: str = None, **kwargs) -> APIRet[_T]:
url_parts = [config.api.scheme, config.api.netloc, f"{config.api.path}{path}", '', '', '']
url = urlunparse(url_parts)
try:
async with httpx.AsyncClient() as client:
async with httpx.AsyncClient(verify=config.ssl_verify) as client:
res = await client.request(
method=cls.method,
url=url,
Expand Down
2 changes: 1 addition & 1 deletion ktoolbox/downloader/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ async def run(

tqdm_class: Type[std_tqdm] = tqdm_class or tqdm.asyncio.tqdm
async with self._lock:
async with httpx.AsyncClient() as client:
async with httpx.AsyncClient(verify=config.ssl_verify) as client:
async with client.stream(
method="GET",
url=self._url,
Expand Down

0 comments on commit 9935b96

Please sign in to comment.