Skip to content

Commit

Permalink
fix: follow redirects (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
juancarlospaco authored Jun 5, 2024
1 parent c99357c commit 521fbd9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion storage3/_async/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ def _create_session(
self, base_url: str, headers: dict[str, str], timeout: int, verify: bool = True
) -> AsyncClient:
return AsyncClient(
base_url=base_url, headers=headers, timeout=timeout, verify=bool(verify)
base_url=base_url,
headers=headers,
timeout=timeout,
verify=bool(verify),
follow_redirects=True,
)

async def __aenter__(self) -> AsyncStorageClient:
Expand Down
6 changes: 5 additions & 1 deletion storage3/_sync/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ def _create_session(
self, base_url: str, headers: dict[str, str], timeout: int, verify: bool = True
) -> SyncClient:
return SyncClient(
base_url=base_url, headers=headers, timeout=timeout, verify=bool(verify)
base_url=base_url,
headers=headers,
timeout=timeout,
verify=bool(verify),
follow_redirects=True,
)

def __enter__(self) -> SyncStorageClient:
Expand Down

0 comments on commit 521fbd9

Please sign in to comment.