diff --git a/supabase_functions/_async/functions_client.py b/supabase_functions/_async/functions_client.py index c1fd033..9705774 100644 --- a/supabase_functions/_async/functions_client.py +++ b/supabase_functions/_async/functions_client.py @@ -8,7 +8,14 @@ class AsyncFunctionsClient: - def __init__(self, url: str, headers: Dict, timeout: int, verify: bool = True): + def __init__( + self, + url: str, + headers: Dict, + timeout: int, + verify: bool = True, + proxy: Optional[str] = None, + ): self.url = url self.headers = { "User-Agent": f"supabase-py/functions-py v{__version__}", @@ -19,6 +26,7 @@ def __init__(self, url: str, headers: Dict, timeout: int, verify: bool = True): headers=self.headers, verify=bool(verify), timeout=timeout, + proxy=proxy, follow_redirects=True, http2=True, ) diff --git a/supabase_functions/_sync/functions_client.py b/supabase_functions/_sync/functions_client.py index edccd25..372d864 100644 --- a/supabase_functions/_sync/functions_client.py +++ b/supabase_functions/_sync/functions_client.py @@ -8,7 +8,14 @@ class SyncFunctionsClient: - def __init__(self, url: str, headers: Dict, timeout: int, verify: bool = True): + def __init__( + self, + url: str, + headers: Dict, + timeout: int, + verify: bool = True, + proxy: Optional[str] = None, + ): self.url = url self.headers = { "User-Agent": f"supabase-py/functions-py v{__version__}", @@ -19,6 +26,7 @@ def __init__(self, url: str, headers: Dict, timeout: int, verify: bool = True): headers=self.headers, verify=bool(verify), timeout=timeout, + proxy=proxy, follow_redirects=True, http2=True, )