await keyword missing fix in response doc (#1520)
This commit is contained in:
parent
abf8534ea9
commit
c42731a55c
|
@ -55,8 +55,8 @@ from sanic import response
|
|||
@app.route("/streaming")
|
||||
async def index(request):
|
||||
async def streaming_fn(response):
|
||||
response.write('foo')
|
||||
response.write('bar')
|
||||
await response.write('foo')
|
||||
await response.write('bar')
|
||||
return response.stream(streaming_fn, content_type='text/plain')
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user