Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Backend
/
HTTPX
Why should a streaming response normally be used as a context manager?
from HTTPX
HTTPX 0.28.1 / Python 3.14
intermediate
1 min
Why should a streaming response normally be used as a context manager?
It guarantees cleanup on success, error, early exit, and cancellation paths.
It forces the complete body into memory before the first iteration.
It makes every received chunk correspond to one application record.
It automatically retries a partially consumed download.
Check
Ask AI about this kata
Report an error
previous kata
Spot the bug in the async HTTPX client
Spot the bug
next kata
What does timeout=5.0 guarantee for a normal HTTPX request?
Quiz
A new version is available
Reload