Skip to content

Commit

Permalink
Don't overwrite default transport so proxies can be set via environme…
Browse files Browse the repository at this point in the history
…nt variables (#398)
  • Loading branch information
mattgd authored Jan 13, 2025
1 parent ed488a9 commit 0da879b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions workos/utils/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ def __init__(
client_id: str,
version: str,
timeout: Optional[int] = None,
transport: Optional[httpx.BaseTransport] = httpx.HTTPTransport(),
# If no custom transport is provided, let httpx use the default
# so we don't overwrite environment configurations like proxies
transport: Optional[httpx.BaseTransport] = None,
) -> None:
super().__init__(
api_key=api_key,
Expand Down Expand Up @@ -136,7 +138,9 @@ def __init__(
client_id: str,
version: str,
timeout: Optional[int] = None,
transport: Optional[httpx.AsyncBaseTransport] = httpx.AsyncHTTPTransport(),
# If no custom transport is provided, let httpx use the default
# so we don't overwrite environment configurations like proxies
transport: Optional[httpx.AsyncBaseTransport] = None,
) -> None:
super().__init__(
base_url=base_url,
Expand Down

0 comments on commit 0da879b

Please sign in to comment.