diff options
| author | Carlton Gibson <carlton.gibson@noumenal.es> | 2022-12-13 16:15:25 +0100 |
|---|---|---|
| committer | Carlton Gibson <carlton.gibson@noumenal.es> | 2022-12-22 10:41:12 +0100 |
| commit | 0bd2c0c9015b53c41394a1c0989afbfd94dc2830 (patch) | |
| tree | 6b24758335cf10eeedfdf7dec50cda3500796305 /docs/topics | |
| parent | ae0899be0d787fbfc5f5ab2b18c5a8219d822d2b (diff) | |
Fixed #33735 -- Added async support to StreamingHttpResponse.
Thanks to Florian Vazelle for initial exploratory work, and to Nick
Pope and Mariusz Felisiak for review.
Diffstat (limited to 'docs/topics')
| -rw-r--r-- | docs/topics/http/middleware.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/topics/http/middleware.txt b/docs/topics/http/middleware.txt index e1a3e95ebc..f0db49abe5 100644 --- a/docs/topics/http/middleware.txt +++ b/docs/topics/http/middleware.txt @@ -267,6 +267,16 @@ must test for streaming responses and adjust their behavior accordingly:: for chunk in content: yield alter_content(chunk) +:class:`~django.http.StreamingHttpResponse` allows both synchronous and +asynchronous iterators. The wrapping function must match. Check +:attr:`StreamingHttpResponse.is_async +<django.http.StreamingHttpResponse.is_async>` if your middleware needs to +support both types of iterator. + +.. versionchanged:: 4.2 + + Support for streaming responses with asynchronous iterators was added. + Exception handling ================== |
