Added documentation for reason argument in the Response object

This commit is contained in:
Miguel Grinberg
2021-08-11 12:00:46 +01:00
parent 2516b296a7
commit d527bdb7c3
2 changed files with 6 additions and 0 deletions

View File

@@ -296,6 +296,9 @@ class Response():
:param status_code: The numeric HTTP status code of the response. The
default is 200.
:param headers: A dictionary of headers to include in the response.
:param reason: A custom reason phrase to add after the status code. The
default is "OK" for responses with a 200 status code and
"N/A" for any other status codes.
"""
types_map = {
'css': 'text/css',

View File

@@ -69,6 +69,9 @@ class Response(BaseResponse):
:param status_code: The numeric HTTP status code of the response. The
default is 200.
:param headers: A dictionary of headers to include in the response.
:param reason: A custom reason phrase to add after the status code. The
default is "OK" for responses with a 200 status code and
"N/A" for any other status codes.
"""
async def write(self, stream):
self.complete()