Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)