def describe_http_status(code):
"""Return a string describing the given HTTP status code."""
try:
code = HTTPStatus(code)
except ValueError:
return "HTTP {code}".format(code=code)
else:
return "HTTP {code.value:d} {code.name}".format(code=code)
评论列表
文章目录