forked from psf/requests
-
-
Notifications
You must be signed in to change notification settings - Fork 42
Closed
Description
- Explain the use-case carefully. Maybe with a code example
It makes sense to be able to set a universal timeout that all requests made with the session can adhere to. This avoids having to pass a custom timeout for every single request
async with AsyncSession(timeout=50) as s:
# Has a timeout of 50 seconds
resp = await s.get('/v1/users')
- Who needs this?
- What pain does this resolve?
This prevents having to pass the timeout parameter on every single request - Is this standard?
Yes. Both httpx and aiohttp for example allows setting a timeout on their respective client objects
Metadata
Metadata
Assignees
Labels
No labels