GithubHelp home page GithubHelp logo

httpcode's Introduction

 _   _ _____ _____ ____   ____ ___  ____  _____
| | | |_   _|_   _|  _ \ / ___/ _ \|  _ \| ____|
| |_| | | |   | | | |_) | |  | | | | | | |  _|
|  _  | | |   | | |  __/| |__| |_| | |_| | |___
|_| |_| |_|   |_| |_|    \____\___/|____/|_____|

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

httpcode's People

Contributors

fcurella avatar fffaraz avatar knowledgejunkie avatar manniche avatar mstriemer avatar rspivak avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.