rspivak/httpcode — Issue #5: Add a method of searching based on HTTP code
Author: mstriemer
Created: 2011-12-24 04:50:54+00:00
State: open

I can never remember which redirect is which, should I use a 301 or 302? It would be nice to have a way of filtering the HTTP codes listed based on a regex or something similar.

I propose:

Filter codes with a regex

$ 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

$ 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