Debian Codegraph @

README.rst

raw
1 ::
2
3 _ _ _____ _____ ____ ____ ___ ____ _____
4 | | | |_ _|_ _| _ \ / ___/ _ \| _ \| ____|
5 | |_| | | | | | | |_) | | | | | | | | | _|
6 | _ | | | | | | __/| |__| |_| | |_| | |___
7 |_| |_| |_| |_| |_| \____\___/|____/|_____|
8
9
10 `httpcode` is a little utility that explains the meaning of an HTTP
11 status code on the command line.
12
13 `http://httpcode.readthedocs.org <http://httpcode.readthedocs.org>`_
14
15 Installation
16 ------------
17
18 ::
19
20 $ [sudo] pip install httpcode
21
22 There is also an official DEB package available at
23 `http://packages.debian.org/sid/httpcode <http://packages.debian.org/sid/httpcode>`_
24
25
26 Usage
27 -----
28
29 Explain 405 status code
30
31 ::
32
33 $ hc 405
34 Status code 405
35 Message: Method Not Allowed
36 Code explanation: Specified method is invalid for this resource.
37
38 Or 418 status code :)
39
40 ::
41
42 $ hc 418
43 Status code 418
44 Message: I'm a teapot
45 Code explanation: The HTCPCP server is a teapot
46
47 List all codes
48
49 ::
50
51 $ hc
52 Status code 100
53 Message: Continue
54 Code explanation: Request received, please continue
55
56 Status code 101
57 Message: Switching Protocols
58 Code explanation: Switching to new protocol; obey Upgrade header
59
60 Status code 200
61 Message: OK
62 Code explanation: Request fulfilled, document follows
63
64 ...
65
66 Search code(s) by description (case-insensitive)
67
68 ::
69
70 $ hc -s too
71 Status code 413
72 Message: Request Entity Too Large
73 Code explanation: Entity is too large.
74
75 Status code 414
76 Message: Request-URI Too Long
77 Code explanation: URI is too long.
78
79 Filter codes with a regex
80
81 ::
82
83 $ hc 30[12]
84 Status code 301
85 Message: Moved Permanently
86 Code explanation: Object moved permanently -- see URI list
87
88 Status code 302
89 Message: Found
90 Code explanation: Object moved temporarily -- see URI list
91
92 Use an 'x' for any digit
93
94 ::
95
96 $ hc 1xx
97 Status code 100
98 Message: Continue
99 Code explanation: Request received, please continue
100
101 Status code 101
102 Message: Switching Protocols
103 Code explanation: Switching to new protocol; obey Upgrade header
104
105 Show help
106
107 ::
108
109 $ hc -h
110 Usage: hc [code] [options]
111
112 code may contain regular expression or use 'x' to denote any digit
113 code examples: 418, 30[12], 3.*, 1xx
114
115 Without parameters lists all available
116 HTTP status codes and their description
117
118
119 Options:
120 -h, --help show this help message and exit
121 -s SEARCH, --search=SEARCH
122 Search for a code by name or description. Search text
123 may contain regular expressions.
124
125 Roadmap
126 -------
127
128 Add more codes