await keyword missing fix in response doc (#1520)

This commit is contained in:
Amit Garu 2019-03-19 18:00:28 +05:45 committed by Stephen Sadowski
parent abf8534ea9
commit c42731a55c

View File

@ -55,8 +55,8 @@ from sanic import response
@app.route("/streaming") @app.route("/streaming")
async def index(request): async def index(request):
async def streaming_fn(response): async def streaming_fn(response):
response.write('foo') await response.write('foo')
response.write('bar') await response.write('bar')
return response.stream(streaming_fn, content_type='text/plain') return response.stream(streaming_fn, content_type='text/plain')
``` ```