Replies: 2 comments
-
|
We don't currently have any timeout parameter for the entire response. There's some discussion on adding further resource limits, here... #1450 (comment) |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
@vitidev I think you can do something like this. I generally prefer this pattern instead of configuring x timeouts. import anyio
import httpx
async def main():
with anyio.move_on_after(1.0) as scope:
async with httpx.AsyncClient(base_url='https://example.com', timeout=None) as client:
print(await client.get('/'))
print('scope cancelled:', scope.cancel_called)
anyio.run(main) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The documentation says that TimeoutException raises after a given period of inactivity.
But what to do if there is no inactivity? - the file downloads slowly, but downloads and no TimeoutException occurs
for example
will work until everything downloads
In this case aiohttp raise TimeoutError after 1 seconds
Beta Was this translation helpful? Give feedback.
All reactions