Skip to main content
 _   _ _____ _____ ____   ____ ___  ____  _____
| | | |_   _|_   _|  _ \ / ___/ _ \|  _ \| ____|
| |_| | | |   | | | |_) | |  | | | | | | |  _|
|  _  | | |   | | |  __/| |__| |_| | |_| | |___
|_| |_| |_|   |_| |_|    \____\___/|____/|_____|

httpcode is a little utility that explains the meaning of an HTTP status code on the command line.

http://httpcode.readthedocs.org

Installation

$ [sudo] pip install httpcode

There is also an official DEB package available at http://packages.debian.org/sid/httpcode

Usage

Explain 405 status code

$ hc 405
Status code 405
Message: Method Not Allowed
Code explanation: Specified method is invalid for this resource.

Or 418 status code :)

$ hc 418
Status code 418
Message: I'm a teapot
Code explanation: The HTCPCP server is a teapot

List all codes

$ 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)

$ 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

$ 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

Show help

$ 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

Change History

0.6 (2017-04-03)

  • Use argparse instead of optparse

  • Declare as Python 2.7+ and Python 3 compatible

0.5 (2011-12-30)

  • Colorize HTTP codes

0.4 (2011-12-27)

0.3 (2011-12-22)

0.2 (2011-12-21)

0.1 (2011-12-21)

  • Initial release

Release files for httpcode 0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for httpcode 0.6
File Size Uploaded
httpcode-0.6.tar.gz 6.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for httpcode 0.6
File Interpreter ABI Platform
httpcode-0.6-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 15.2 kB

Release files / httpcode-0.6.tar.gz

Download URL httpcode-0.6.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
144af6433bd7f75bb549884dbefba4d81add4e26bd88fbdc2330805c5403bbc2
BLAKE2b-256 checksum
How to use checksums
ff500c40beb739fbccabc9be45a924cacd71caee3f4f008f6c321fcb80fd5298
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / httpcode-0.6-py2.py3-none-any.whl

Download URL httpcode-0.6-py2.py3-none-any.whl
Size 8.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
250ca597fe981f309646a6295d10296140dab7964294a202954553c32ba1f9c4
BLAKE2b-256 checksum
How to use checksums
3e1268d75db42adf2751c189d08897eed294cc8e208a25d38b9633686cbefe83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.6 This release

2 release files

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page