summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexerson <Alexerson@users.noreply.github.com>2023-05-12 06:34:47 -0700
committerNatalia <124304+nessita@users.noreply.github.com>2023-05-12 10:36:03 -0300
commitddccecee91601ce790c82b0aa03b2fa751580361 (patch)
tree98953abb8f7b58ce9b8bb603b2daeeedd8df110e
parentdbe263751cf80732c2cd47d409f5f0a9701ec327 (diff)
downloaddjango-ddccecee91601ce790c82b0aa03b2fa751580361.tar.gz
[4.2.x] Fixed #34556 -- Doc'd that StreamingHttpResponse accepts memoryviews and strings iterators.
Backport of 599f3e2cda50ab084915ffd08edb5ad6cad61415 from main
-rw-r--r--docs/ref/request-response.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt
index 2c195b6f90..c8e55ea370 100644
--- a/docs/ref/request-response.txt
+++ b/docs/ref/request-response.txt
@@ -1204,9 +1204,9 @@ The :class:`StreamingHttpResponse` is not a subclass of :class:`HttpResponse`,
because it features a slightly different API. However, it is almost identical,
with the following notable differences:
-* It should be given an iterator that yields bytestrings as content. When
- serving under WSGI, this should be a sync iterator. When serving under ASGI,
- this is should an async iterator.
+* It should be given an iterator that yields bytestrings, :class:`memoryview`,
+ or strings as content. When serving under WSGI, this should be a sync
+ iterator. When serving under ASGI, then it should be an async iterator.
* You cannot access its content, except by iterating the response object
itself. This should only occur when the response is returned to the client: