more info in docs
This commit is contained in:
parent
fa13ad8849
commit
1a8961587c
@ -3,6 +3,9 @@
|
|||||||
Sanic allows you to stream content to the client with the `stream` method. This method accepts a coroutine callback which is passed a `StreamingHTTPResponse` object that is written to. A simple example is like follows:
|
Sanic allows you to stream content to the client with the `stream` method. This method accepts a coroutine callback which is passed a `StreamingHTTPResponse` object that is written to. A simple example is like follows:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
from sanic import Sanic
|
||||||
|
from sanic.response import stream
|
||||||
|
|
||||||
app = Sanic(__name__)
|
app = Sanic(__name__)
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user