From 65ae7669f9acd0fa1e3d68310d143e647f5a94ca Mon Sep 17 00:00:00 2001 From: Pete Wildsmith Date: Fri, 24 Mar 2017 10:11:30 +0000 Subject: [PATCH] Document synchronous response.write in streaming The Streaming section of the docs was updated to make clear that a synchronous write should be used in the callback, but this section was not updated. --- docs/sanic/response.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sanic/response.md b/docs/sanic/response.md index 1a336d47..12718ca1 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): - await response.write('foo') - await response.write('bar') + response.write('foo') + response.write('bar') return response.stream(streaming_fn, content_type='text/plain') ```