From ce35a0fdd2895139d58b85bc9674044b9df0d731 Mon Sep 17 00:00:00 2001 From: Jack Decker <24392469+jackowfish@users.noreply.github.com> Date: Wed, 29 Jul 2026 11:57:25 -0400 Subject: [PATCH] follow redirects --- porter_sandbox/_async_base_client.py | 4 ++++ porter_sandbox/_base_client.py | 4 ++++ 2 files changed, 8 insertions(+) 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: