Skip to content

Allow passing an SSL context to the httpx client #202

Open
@ap--

Description

@ap--

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    pythonPull requests that update Python code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions