HTTPie is a tool for performing HTTP requests from the command line. It is a simple but very effective program that allows you to perform various HTTP operations.
Table of contents
If you are involved in application development one of the things you will definitely spend time on is interacting with APIs. If you've previously used tools like cURL or Wget then in this article you'll learn about a new tool like HTTPie.
What is HTTPie?
HTTPie is a command-line HTTP client. Its purpose is to make CLI interaction with web services as human-friendly as possible. HTTPie is designed for testing, debugging and generally interacting with HTTP APIs and servers.
Capabilities of HTTPie
HTTPie uses a simple and natural syntax and provides formatted and colored data output. HTTPie's main features are:
- Expressive and intuitive syntax
- Formatted and colored terminal exit
- Built-in JSON support
- Transfer of forms and files
- HTTPS, proxy and authentication
- Any request data
- Custom headers
- Persistent sessions
- Wget-style downloading
- Linux, macOS, Windows and FreeBSD support
- Test coverage
If you are doing the installation on a macOs system you will need a software package management system like brew installed, while if you are using Windows systems you will need the Chocolatey package manager. In will present the installation on macOs system, if you are working on another system take a look at the HTTPie documentation.
To install HTTPie, type the following commands in a terminal:
brew update brew install httpie