diff --git a/docs/sanic/response.md b/docs/sanic/response.md index f322f8c8..47901c05 100644 --- a/docs/sanic/response.md +++ b/docs/sanic/response.md @@ -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') ```