HTTPie - Modern Command line HTTP Client

HTTPie (pronounced aitch-tee-tee-pie) 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 output. HTTPie can be used for testing, debugging, and generally interacting with HTTP servers.


  • 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
  • Plugins
  • Documentation
  • Test coverage


  • macOS
On macOS, HTTPie can be installed via Homebrew (recommended):
$ brew install httpie
A MacPorts port is also available:
$ port install httpie

  • Linux
Most Linux distributions provide a package that can be installed using the system package manager, for example:
# Debian, Ubuntu, etc.
$ apt-get install httpie
# Fedora
$ dnf install httpie
# CentOS, RHEL, ...
$ yum install httpie
# Arch Linux
$ pacman -S httpie

  • Windows, etc.
A universal installation method (that works on Windows, Mac OS X, Linux, …, and always provides the latest version) is to use pip:
# Make sure we have an up-to-date version of pip and setuptools:
$ pip install --upgrade pip setuptools

$ pip install --upgrade httpie
(If pip installation fails for some reason, you can try easy_install httpie as a fallback.)


$ http [flags] [METHOD] URL [ITEM [ITEM]]


  • Custom HTTP method, HTTP headers and JSON data:
$ http PUT X-API-Token:123 name=John

  • Submitting forms:
$ http -f POST hello=World

  • See the request that is being sent using one of the output options:
$ http -v

  • Use Github API to post a comment on an issue with authentication:
83/comments body='HTTPie is awesome! :heart:'

  • Upload a file using redirected input:
$ http < file.json

  • Download a file and save it via redirected output:
$ http > file

  • Download a file wget style:
$ http --download

  • Use named sessions to make certain aspects or the communication persistent between requests to the same host:
$ http --session=logged-in -a username:password API-Key:123

$ http --session=logged-in

  • Set a custom Host header to work around missing DNS records:
$ http localhost:8000

No comments

Powered by Blogger.