Skip to content

Commit

Permalink
Merge pull request #1755 from Lagicrus/empty-response
Browse files Browse the repository at this point in the history
Update docs
  • Loading branch information
seemethere authored Jan 5, 2020
2 parents 3430907 + 0fd08c6 commit 784d5cc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/sanic/response.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,19 @@ Response without encoding the body
def handle_request(request):
return response.raw(b'raw data')
Empty
--------------

For responding with an empty message as defined by `RFC 2616 <https://tools.ietf.org/search/rfc2616#section-7.2.1>`_

.. code-block:: python
from sanic import response
@app.route('/empty')
async def handle_request(request):
return response.empty()
Modify headers or status
------------------------

Expand Down

0 comments on commit 784d5cc

Please sign in to comment.