HTTPie is a command line HTTP client. Its goal is to make CLI interaction
with web services as human-friendly as possible. It provides a
simple http command that allows for sending arbitrary HTTP requests using a
simple and natural syntax, and displays colorized responses. HTTPie can be used
for testing, debugging, and generally interacting with HTTP servers.
HTTPie is written in Python, and under the hood it uses the excellent Requests and Pygments libraries.
Table of Contents
Alternatively:
Or, you can install the development version directly from GitHub:
There are also packages available for Ubuntu, Debian, and possibly other
Linux distributions as well. However, there may be a significant delay between
official HTTPie releases and package updates.
Synopsis:
See also http --help.
Submitting forms:
See the request that is being sent using one of the output options:
Use Github API to post a comment on an
issue
with authentication:
Upload a file using redirected input:
Download a file and save it via redirected output:
Download a file wget style:
Use named sessions to make certain aspects or the communication persistent
between requests to the same host:
Set a custom Host header to work around missing DNS records:
What follows is a detailed documentation. It covers the command syntax, advanced usage, and also features additional examples.
from https://github.com/jkbr/httpie
HTTPie is written in Python, and under the hood it uses the excellent Requests and Pygments libraries.
Table of Contents
- Main Features
- Installation
- Usage
- HTTP Method
- Request URL
- Request Items
- JSON
- Forms
- HTTP Headers
- Authentication
- Proxies
- HTTPS
- Output Options
- Redirected Input
- Terminal Output
- Redirected Output
- Download Mode
- Streamed Responses
- Sessions
- Config
- Scripting
- Interface Design
- Contribute
- Logo
- Authors
- Licence
- Changelog
Main Features
- Expressive and intuitive syntax
- Formatted and colorized terminal output
- Built-in JSON support
- Forms and file uploads
- HTTPS, proxies, and authentication
- Arbitrary request data
- Custom headers
- Persistent sessions
- Wget-like downloads
- Python 2.6, 2.7 and 3.x support
- Linux, Mac OS X and Windows support
- Documentation
- Test coverage
Installation
The latest stable version of HTTPie can always be installed or updated to via pip (prefered) or easy_install:$ pip install --upgrade httpie
$ easy_install httpie
$ pip install --upgrade https://github.com/jkbr/httpie/tarball/master
Usage
Hello World:$ http httpie.org
$ http [flags] [METHOD] URL [ITEM [ITEM]]
Examples
Custom HTTP method, HTTP headers and JSON data:$ http PUT example.org X-API-Token:123 name=John
$ http -f POST example.org hello=World
$ http -v example.org
$ http -a USERNAME POST https://api.github.com/repos/jkbr/httpie/issues/83/comments body='HTTPie is awesome!'
$ http example.org < file.json
$ http example.org/file > file
$ http --download example.org/file
$ http --session=logged-in -a username:password httpbin.org/get API-Key:123
$ http --session=logged-in httpbin.org/headers
$ http localhost:8000 Host:example.com
What follows is a detailed documentation. It covers the command syntax, advanced usage, and also features additional examples.
from https://github.com/jkbr/httpie