1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
|
.. httpcode documentation master file, created by
sphinx-quickstart on Wed Dec 21 15:35:58 2011.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to httpcode
===================
::
_ _ _____ _____ ____ ____ ___ ____ _____
| | | |_ _|_ _| _ \ / ___/ _ \| _ \| ____|
| |_| | | | | | | |_) | | | | | | | | | _|
| _ | | | | | | __/| |__| |_| | |_| | |___
|_| |_| |_| |_| |_| \____\___/|____/|_____|
`httpcode` is a little utility that explains the meaning of an HTTP
status code on the command line.
Installation
------------
.. code-block:: bash
$ [sudo] pip install httpcode
Usage
-----
Explain 405 status code
.. code-block:: bash
$ hc 405
Status code 405
Message: Method Not Allowed
Code explanation: Specified method is invalid for this resource.
Or 418 status code :)
.. code-block:: bash
$ hc 418
Status code 418
Message: I'm a teapot
Code explanation: The HTCPCP server is a teapot
List all codes
.. code-block:: bash
$ 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
...
Search code(s) by description (case-insensitive)
.. code-block:: bash
$ 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.
Filter codes with a regex
.. code-block:: bash
$ 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
Use an 'x' for any digit
.. code-block:: bash
$ 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
Show help
.. code-block:: bash
$ 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.
Roadmap
-------
Add more codes
|