How to use the httpcore.backends.sync.SyncResponse 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
*,
        stream: bool = False,
        allow_redirects: bool = True,
        ssl: SSLConfig = None,
        timeout: TimeoutConfig = None,
    ) -> SyncResponse:
        response = self._loop.run_until_complete(
            self._client.send(
                request,
                stream=stream,
                allow_redirects=allow_redirects,
                ssl=ssl,
                timeout=timeout,
            )
        )
        return SyncResponse(response, self._loop)