Skip to content

Commit d021ab4

Browse files
fix: follow redirect bool
1 parent b5a364b commit d021ab4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/agora_agent/pool_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,25 +75,25 @@ async def _debug_response_async(response: httpx.Response) -> None:
7575
def _create_debug_client(
7676
*,
7777
timeout: typing.Optional[float],
78-
follow_redirects: bool,
78+
follow_redirects: typing.Optional[bool],
7979
) -> httpx.Client:
8080
"""Create an httpx.Client with request/response logging hooks."""
8181
return httpx.Client(
8282
timeout=timeout or 60.0,
83-
follow_redirects=follow_redirects,
83+
follow_redirects=follow_redirects if follow_redirects is not None else False,
8484
event_hooks={"request": [_debug_request], "response": [_debug_response]},
8585
)
8686

8787

8888
def _create_debug_async_client(
8989
*,
9090
timeout: typing.Optional[float],
91-
follow_redirects: bool,
91+
follow_redirects: typing.Optional[bool],
9292
) -> httpx.AsyncClient:
9393
"""Create an httpx.AsyncClient with request/response logging hooks."""
9494
return httpx.AsyncClient(
9595
timeout=timeout or 60.0,
96-
follow_redirects=follow_redirects,
96+
follow_redirects=follow_redirects if follow_redirects is not None else False,
9797
event_hooks={
9898
"request": [_debug_request_async],
9999
"response": [_debug_response_async],

0 commit comments

Comments
 (0)