diff --git a/porter_sandbox/_async_base_client.py b/porter_sandbox/_async_base_client.py index 2ceb4e5..a7e8946 100644 --- a/porter_sandbox/_async_base_client.py +++ b/porter_sandbox/_async_base_client.py @@ -58,6 +58,10 @@ def __init__( timeout=config.timeout, verify=verify, headers=headers, + # Some endpoints redirect to the service that owns the data. httpx + # does not follow redirects by default, so callers would get the + # 3xx instead of the response. + follow_redirects=True, ) async def __aenter__(self) -> _AsyncBaseClient: diff --git a/porter_sandbox/_base_client.py b/porter_sandbox/_base_client.py index 9ba08f8..28bb139 100644 --- a/porter_sandbox/_base_client.py +++ b/porter_sandbox/_base_client.py @@ -58,6 +58,10 @@ def __init__( timeout=config.timeout, verify=verify, headers=headers, + # Some endpoints redirect to the service that owns the data. httpx + # does not follow redirects by default, so callers would get the + # 3xx instead of the response. + follow_redirects=True, ) def __enter__(self) -> _BaseClient: