diff --git a/docs/sanic/response.md b/docs/sanic/response.md index 47901c05..11034727 100644 --- a/docs/sanic/response.md +++ b/docs/sanic/response.md @@ -60,6 +60,8 @@ async def index(request): return response.stream(streaming_fn, content_type='text/plain') ``` +See [Streaming](streaming.md) for more information. + ## File Streaming For large files, a combination of File and Streaming above ```python diff --git a/docs/sanic/streaming.md b/docs/sanic/streaming.md index 769d269d..53d23ea3 100644 --- a/docs/sanic/streaming.md +++ b/docs/sanic/streaming.md @@ -117,3 +117,5 @@ async def index(request): return stream(stream_from_db) ``` + +If a client supports HTTP/1.1, Sanic will use [chunked transfer encoding](https://en.wikipedia.org/wiki/Chunked_transfer_encoding); you can explicitly enable or disable it using `chunked` option of the `stream` function.