Skip to content

Allow passing an SSL context to the httpx client #202

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
ap-- opened this issue May 6, 2025 · 1 comment · May be fixed by #203
Open

Allow passing an SSL context to the httpx client #202

ap-- opened this issue May 6, 2025 · 1 comment · May be fixed by #203
Labels
python Pull requests that update Python code

Comments

@ap--
Copy link

ap-- commented May 6, 2025

Hello everyone 👋

Because the SyncFunctionsClient verify argument is cast to bool, it's not possible to pass down an SSL Context to the underlying httpx.Client.
This can be problematic when working with custom certificates in corporate environments.

SyncFunctionsClient

httpx.Client

https://github.com/encode/httpx/blob/26d48e0634e6ee9cdc0533996db289ce4b430177/httpx/_client.py#L646

# the verify arg of `httpx.Client` accepts ssl.SSLContext
verify: ssl.SSLContext | str | bool = True,

proposed fix

A trivial fix would be to remove the bool() cast. I'll open a PR for discussion.

Cheers,
Andreas

ap-- added a commit to ap--/functions-py that referenced this issue May 6, 2025
@ap-- ap-- linked a pull request May 6, 2025 that will close this issue
@silentworks
Copy link
Collaborator

We're working on a better option of allowing you to pass your own httpx client so that you can access all the params directly and customize your httpx client to it's fullest without any limitations. #201

@grdsdev grdsdev added the python Pull requests that update Python code label May 12, 2025 — with Linear
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
python Pull requests that update Python code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants