Update response docstrings to be explicit on whats returned.

This commit is contained in:
Sean Parsons 2016-12-25 01:24:17 -05:00
parent a486fb99a9
commit d5ad5e46da

View File

@ -140,7 +140,7 @@ class HTTPResponse:
def json(body, status=200, headers=None): def json(body, status=200, headers=None):
""" """
Returns body in json format. Returns response object with body in json format.
:param body: Response data to be serialized. :param body: Response data to be serialized.
:param status: Response code. :param status: Response code.
:param headers: Custom Headers. :param headers: Custom Headers.
@ -151,7 +151,7 @@ def json(body, status=200, headers=None):
def text(body, status=200, headers=None): def text(body, status=200, headers=None):
""" """
Returns body in text format. Returns response object with body in text format.
:param body: Response data to be encoded. :param body: Response data to be encoded.
:param status: Response code. :param status: Response code.
:param headers: Custom Headers. :param headers: Custom Headers.
@ -162,7 +162,7 @@ def text(body, status=200, headers=None):
def html(body, status=200, headers=None): def html(body, status=200, headers=None):
""" """
Returns body in html format. Returns response object with body in html format.
:param body: Response data to be encoded. :param body: Response data to be encoded.
:param status: Response code. :param status: Response code.
:param headers: Custom Headers. :param headers: Custom Headers.
@ -173,7 +173,7 @@ def html(body, status=200, headers=None):
async def file(location, mime_type=None, headers=None): async def file(location, mime_type=None, headers=None):
""" """
Returns file with mime_type. Returns response object with file data.
:param location: Location of file on system. :param location: Location of file on system.
:param mime_type: Specific mime_type. :param mime_type: Specific mime_type.
:param headers: Custom Headers. :param headers: Custom Headers.