Return status code plus status text descriptive message
(status: bytes | float | str)
| 54 | |
| 55 | |
| 56 | def response_status_message(status: bytes | float | str) -> str: |
| 57 | """Return status code plus status text descriptive message""" |
| 58 | status_int = int(status) |
| 59 | message = http.RESPONSES.get(status_int, "Unknown Status") |
| 60 | return f"{status_int} {to_unicode(message)}" |
| 61 | |
| 62 | |
| 63 | def _remove_html_comments(body: bytes) -> bytes: |