用法:
class http.HTTPStatus
3.5 版中的新函數。
enum.IntEnum
的子類,它定義了一組 HTTP 狀態代碼、原因短語和用英語編寫的長說明。用法:
>>> from http import HTTPStatus >>> HTTPStatus.OK <HTTPStatus.OK: 200> >>> HTTPStatus.OK == 200 True >>> HTTPStatus.OK.value 200 >>> HTTPStatus.OK.phrase 'OK' >>> HTTPStatus.OK.description 'Request fulfilled, document follows' >>> list(HTTPStatus) [<HTTPStatus.CONTINUE: 100>, <HTTPStatus.SWITCHING_PROTOCOLS:101>, ...]
相關用法
- Python http.client.HTTPConnection.set_tunnel用法及代碼示例
- Python http.client.HTTPConnection用法及代碼示例
- Python html.escape()用法及代碼示例
- Python html.unescape()用法及代碼示例
- Python hashlib.sha3_256()用法及代碼示例
- Python help()用法及代碼示例
- Python hashlib.sha3_512()用法及代碼示例
- Python hashlib.blake2s()用法及代碼示例
- Python hashlib.blake2b()用法及代碼示例
- Python hasattr()用法及代碼示例
- Python statistics harmonic_mean()用法及代碼示例
- Python math hypot()用法及代碼示例
- Python hash()用法及代碼示例
- Python hashlib.sha3_224()用法及代碼示例
- Python hashlib.shake_256()用法及代碼示例
- Python hex()用法及代碼示例
- Python OpenCV haveImageReader()用法及代碼示例
- Python hashlib.pbkdf2_hmac用法及代碼示例
- Python hashlib.shake_128()用法及代碼示例
- Python hex用法及代碼示例
注:本文由純淨天空篩選整理自python.org大神的英文原創作品 http.HTTPStatus。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。