Meta

Interface design

The syntax of the command arguments closely corresponds to the actual HTTPrequests sent over the wire. It has the advantage that it's easy to rememberand read. It is often possible to translate an HTTP request to an HTTPieargument list just by inlining the request elements. For example, compare thisHTTP request:

  1. POST /collection HTTP/1.1
  2. X-API-Key: 123
  3. User-Agent: Bacon/1.0
  4. Content-Type: application/x-www-form-urlencoded
  5.  
  6. name=value&name2=value2

with the HTTPie command that sends it:

  1. $ http -f POST example.org/collection \
  2. X-API-Key:123 \
  3. User-Agent:Bacon/1.0 \
  4. name=value \
  5. name2=value2

Notice that both the order of elements and the syntax is very similar,and that only a small portion of the command is used to control HTTPie anddoesn't directly correspond to any part of the request (here it's only -fasking HTTPie to send a form request).

The two modes, —pretty=all (default for terminal) and —pretty=none(default for redirected output), allow for both user-friendly interactive useand usage from scripts, where HTTPie serves as a generic HTTP client.

As HTTPie is still under heavy development, the existing command linesyntax and some of the —OPTIONS may change slightly beforeHTTPie reaches its final version 1.0. All changes are recorded in thechange log.

User support

Please use the following support channels:

Dependencies

Under the hood, HTTPie uses these two amazing libraries:

  • Requests— Python HTTP library for humans
  • Pygments— Python syntax highlighter

HTTPie friends

HTTPie plays exceptionally well with the following tools:

  • jq— CLI JSON processor thatworks great in conjunction with HTTPie
  • http-prompt— interactive shell for HTTPie featuring autocompleteand command syntax highlighting

Alternatives

  • httpcat — a lower-level sister utilityof HTTPie for constructing raw HTTP requests on the command line.
  • curl — a "Swiss knife" command line tool andan exceptional library for transferring data with URLs.

Contributing

See CONTRIBUTING.rst.

Change log

See CHANGELOG.

Artwork

Licence

BSD-3-Clause: LICENSE.

Authors

Jakub Roztocil (@jakubroztocil) created HTTPie and these fine peoplehave contributed.