From cd779b6e4fab4e856709b96f8b39dd1144bf72e3 Mon Sep 17 00:00:00 2001 From: Lagicrus Date: Sat, 4 Jan 2020 19:51:50 +0000 Subject: [PATCH] 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 ------------------------