HTTPie CLI docs

Contents…

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. HTTPie is designed for testing, debugging, and generally interacting with APIs & HTTP servers. The http & https commands allow for creating and sending arbitrary HTTP requests. They use simple and natural syntax and provide formatted and colorized output.

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
  • Linux, macOS, Windows, and FreeBSD support
  • Plugins
  • Documentation
  • Test coverage

Installation

Universal

PyPI

Please make sure you have Python 3.7 or newer (python --version).

# Install httpie
$ python -m pip install --upgrade pip wheel
$ python -m pip install httpie
# Upgrade httpie
$ python -m pip install --upgrade pip wheel
$ python -m pip install --upgrade httpie

macOS

Homebrew

To install Homebrew, see its installation.

# Install httpie
$ brew update
$ brew install httpie
# Upgrade httpie
$ brew update
$ brew upgrade httpie

MacPorts

To install MacPorts, see its installation.

# Install httpie
$ port selfupdate
$ port install httpie
# Upgrade httpie
$ port selfupdate
$ port upgrade httpie

Windows

Chocolatey

To install Chocolatey, see its installation.

# Install httpie
$ choco install httpie
Run
# Upgrade httpie
$ choco upgrade httpie
Run

Linux

Debian and Ubuntu

Also works for other Debian-derived distributions like MX Linux, Linux Mint, deepin, Pop!_OS, KDE neon, Zorin OS, elementary OS, Kubuntu, Devuan, Linux Lite, Peppermint OS, Lubuntu, antiX, Xubuntu, etc.

# Install httpie
$ curl -SsL https://packages.httpie.io/deb/KEY.gpg | sudo gpg --dearmor -o /usr/share/keyrings/httpie.gpg
$ echo "deb [arch=amd64 signed-by=/usr/share/keyrings/httpie.gpg] https://packages.httpie.io/deb ./" | sudo tee /etc/apt/sources.list.d/httpie.list > /dev/null
$ sudo apt update
$ sudo apt install httpie
# Upgrade httpie
$ sudo apt update && sudo apt upgrade httpie
Run

Fedora

# Install httpie
$ dnf install httpie
Run
# Upgrade httpie
$ dnf upgrade httpie
Run

CentOS and RHEL

Also works for other RHEL-derived distributions like ClearOS, Oracle Linux, etc.

# Install httpie
$ yum install epel-release
$ yum install httpie
# Upgrade httpie
$ yum upgrade httpie
Run

Single binary executables

Get the standalone HTTPie Linux executables when you don't want to go through the full installation process.

# Install httpie
$ https --download packages.httpie.io/binaries/linux/http-latest -o http
$ ln -ls ./http ./https
$ chmod +x ./http ./https
# Upgrade httpie
$ https --download packages.httpie.io/binaries/linux/http-latest -o http
Run

Snapcraft (Linux)

To install Snapcraft, see its installation.

# Install httpie
$ snap install httpie
Run
# Upgrade httpie
$ snap refresh httpie
Run

Linuxbrew

To install Linuxbrew, see its installation.