Skip to content

Commit

Permalink
Added documentation for reason argument in the Response object
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Aug 11, 2021
1 parent 2516b29 commit d527bdb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/microdot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 3 additions & 0 deletions src/microdot_asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit d527bdb

Please sign in to comment.