From cd779b6e4fab4e856709b96f8b39dd1144bf72e3 Mon Sep 17 00:00:00 2001 From: Lagicrus Date: Sat, 4 Jan 2020 19:51:50 +0000 Subject: [PATCH 1/2] Update response.rst --- docs/sanic/response.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/sanic/response.rst b/docs/sanic/response.rst index 75a44425..6fb487b2 100644 --- a/docs/sanic/response.rst +++ b/docs/sanic/response.rst @@ -107,6 +107,19 @@ Response without encoding the body def handle_request(request): return response.raw(b'raw data') +Empty +-------------- + +For responding with a empty message as defined by `RFC 2616 `_ + +.. code-block:: python + + from sanic import response + + @app.route('/empty') + async def handle_request(request): + return response.empty() + Modify headers or status ------------------------ From 0fd08c6114a62541a2c060ad2b4279208b1234f7 Mon Sep 17 00:00:00 2001 From: Lagicrus Date: Sat, 4 Jan 2020 21:26:03 +0000 Subject: [PATCH 2/2] Update response.rst --- docs/sanic/response.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sanic/response.rst b/docs/sanic/response.rst index 6fb487b2..a241b7ac 100644 --- a/docs/sanic/response.rst +++ b/docs/sanic/response.rst @@ -110,7 +110,7 @@ Response without encoding the body Empty -------------- -For responding with a empty message as defined by `RFC 2616 `_ +For responding with an empty message as defined by `RFC 2616 `_ .. code-block:: python