httpcode - 解释HTTP状态码
项目描述
_ _ _____ _____ ____ ____ ___ ____ _____ | | | |_ _|_ _| _ \ / ___/ _ \| _ \| ____| | |_| | | | | | | |_) | | | | | | | | | _| | _ | | | | | | __/| |__| |_| | |_| | |___ |_| |_| |_| |_| |_| \____\___/|____/|_____|
httpcode是一个小工具,用于在命令行中解释HTTP状态码的含义。
http://httpcode.readthedocs.org
安装
$ [sudo] pip install httpcode
还有官方的DEB软件包可在http://packages.debian.org/sid/httpcode找到
用法
解释405状态码
$ hc 405 Status code 405 Message: Method Not Allowed Code explanation: Specified method is invalid for this resource.
或418状态码 :)
$ hc 418 Status code 418 Message: I'm a teapot Code explanation: The HTCPCP server is a teapot
列出所有代码
$ hc Status code 100 Message: Continue Code explanation: Request received, please continue Status code 101 Message: Switching Protocols Code explanation: Switching to new protocol; obey Upgrade header Status code 200 Message: OK Code explanation: Request fulfilled, document follows ...
按描述(不区分大小写)搜索代码
$ hc -s too Status code 413 Message: Request Entity Too Large Code explanation: Entity is too large. Status code 414 Message: Request-URI Too Long Code explanation: URI is too long.
使用正则表达式筛选代码
$ hc 30[12] Status code 301 Message: Moved Permanently Code explanation: Object moved permanently -- see URI list Status code 302 Message: Found Code explanation: Object moved temporarily -- see URI list
使用‘x’表示任何数字
$ hc 1xx Status code 100 Message: Continue Code explanation: Request received, please continue Status code 101 Message: Switching Protocols Code explanation: Switching to new protocol; obey Upgrade header
显示帮助
$ hc -h Usage: hc [code] [options] code may contain regular expression or use 'x' to denote any digit code examples: 418, 30[12], 3.*, 1xx Without parameters lists all available HTTP status codes and their description Options: -h, --help show this help message and exit -s SEARCH, --search=SEARCH Search for a code by name or description. Search text may contain regular expressions.
路线图
添加更多代码
变更历史
0.6 (2017-04-03)
使用argparse代替optparse
声明为Python 2.7+和Python 3兼容
0.5 (2011-12-30)
着色HTTP代码
0.4 (2011-12-27)
正则表达式和‘x’可以用作HTTP代码的一部分 https://github.com/rspivak/httpcode/pull/6
0.3 (2011-12-22)
添加-s/–search选项,通过描述搜索代码 https://github.com/rspivak/httpcode/pull/3
0.2 (2011-12-21)
添加HTTP代码418(我是一壶茶): https://github.com/rspivak/httpcode/pull/2
0.1 (2011-12-21)
初始发布
项目详情
下载文件
下载适合您平台文件的文件。如果您不确定该选择哪个,请了解更多有关安装包的信息。
源分发
httpcode-0.6.tar.gz (6.5 kB 查看哈希值)
构建分发
httpcode-0.6-py2.py3-none-any.whl (8.7 kB 查看哈希值)
关闭
httpcode-0.6.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 144af6433bd7f75bb549884dbefba4d81add4e26bd88fbdc2330805c5403bbc2 |
|
MD5 | b5ba8ff23b99bc8623d3776ad4bbade5 |
|
BLAKE2b-256 | ff500c40beb739fbccabc9be45a924cacd71caee3f4f008f6c321fcb80fd5298 |
关闭
httpcode-0.6-py2.py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 250ca597fe981f309646a6295d10296140dab7964294a202954553c32ba1f9c4 |
|
MD5 | c2ee6994cb3679512d89a9fbe1cb4ab4 |
|
BLAKE2b-256 | 3e1268d75db42adf2751c189d08897eed294cc8e208a25d38b9633686cbefe83 |