Skip to content

hamolicious/HTTP-Code-Lookup

Repository files navigation

HTTP Code Lookup

Allows you to very quickly view and search an offline version of the Wikipedia's HTTP Codes page.

What the hell is this?

Look up specific codes

code lookup

Filter using wildcards

wildcard lookup

Don't know the status code?

text lookup

How to Install

pip install hhttpcode

Using Python

python -m http-code <search_term>

Using alias/DOSKEY

Setting up an alias for the script will allow you to use a custom, short "name" for any action.

For Unix systems place the following into .bashrc or .zshrc

alias http-code="python -m httcode $@"

For Windows place the following into your bat file that runs on terminal startup. If you do not know how to set this up, look into this answer on Stack Overflow

DOSKEY http-code="python -m httcode" $*

Arguments

The usage for the tool is as follows:

http-code <search_term> --output-as-json --no-pretty --indent-size --no-colour
  • <search_term>
    • Mandatory: Can be either a 3 digit code (use x to replace unknowns, eg: 2xx for all codes starting with 2) or a text search.
  • --output-as-json
    • Optional: Output as JSON, by default will pretty-print JSON... use --no-pretty to disable
  • --no-pretty
    • Optional: Disable pretty printing of JSON, does nothing without --output-as-json flag set
  • --indent-size
    • Optional: Change the default (2) indent size
  • --no-colour
    • Optional: Disable colour for non-JSON output

How to test

python tests/test.py

Known Issues

  • Tests don't run on Windows systems :|

About

Allows you to very quickly view and search Wikipedia's HTTP Codes page.

Resources

License

Stars

Watchers

Forks

Languages