How to use the httpcore.config.DEFAULT_SSL_CONFIG function in httpcore

To help you get started, we’ve selected a few httpcore examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github encode / httpx / httpcore / backends / sync.py View on Github external
def __init__(
        self,
        ssl: SSLConfig = DEFAULT_SSL_CONFIG,
        timeout: TimeoutConfig = DEFAULT_TIMEOUT_CONFIG,
        pool_limits: PoolLimits = DEFAULT_POOL_LIMITS,
        max_redirects: int = DEFAULT_MAX_REDIRECTS,
    ) -> None:
        self._client = Client(
            ssl=ssl,
            timeout=timeout,
            pool_limits=pool_limits,
            max_redirects=max_redirects,
        )
        self._loop = asyncio.new_event_loop()
github encode / httpx / httpcore / http11.py View on Github external
def __init__(
        self,
        origin: typing.Union[str, Origin],
        ssl: SSLConfig = DEFAULT_SSL_CONFIG,
        timeout: TimeoutConfig = DEFAULT_TIMEOUT_CONFIG,
        on_release: typing.Callable = None,
    ):
        self.origin = Origin(origin) if isinstance(origin, str) else origin
        self.ssl = ssl
        self.timeout = timeout
        self.on_release = on_release
        self._reader = None
        self._writer = None
        self._h11_state = h11.Connection(our_role=h11.CLIENT)