How to use the http3.ConnectTimeout function in http3

To help you get started, we’ve selected a few http3 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 / requests-async / requests_async / adapters.py View on Github external
timeout = http3.TimeoutConfig(**timeout_kwargs)

        try:
            response = await self.pool.request(
                method,
                url,
                headers=headers,
                data=body,
                cert=cert,
                verify=verify,
                timeout=timeout,
            )
        except socket.error as err:
            raise ConnectionError(err, request=request)
        except http3.ConnectTimeout as err:
            raise ConnectTimeout(err, request=request)
        except http3.ReadTimeout as err:
            raise ReadTimeout(err, request=request)

        if not stream:
            await response.read()

        return self.build_response(request, response)

http3

The next generation HTTP client.

BSD-3-Clause
Latest version published 5 years ago

Package Health Score

66 / 100
Full package analysis