Skip to content

Document using a custom SSL Context #926

Closed

Description

@lovelydinosaur

Prompted by #924

Our SSL docs don't include any examples of using a custom SSL context.

See: https://www.python-httpx.org/advanced/#ssl-certificates

I think we ought to include a minimal example, such as...

>>> import httpx
>>> import ssl
>>> import certifi
>>> context = ssl.create_default_context()
>>> context.load_verify_locations(cafile=certifi.where())
>>> httpx.get('https://www.example.com', verify=context)
<Response [200 OK]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsChanges to the documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions