Ah, curl
. While widely-loved and wildly powerful, its ergonomics leave something to be desired. Although it should not replace curl
in your automation, HTTPie provides a much more human-friendly interface for testing endpoints, downloading files, submitting forms, and a whole lot more.
Installation
Most Linux distributions provide HTTPie via your system package manager. It is available on macOS via Homebrew or MacPorts, and via pip for Windows and all platforms mentioned above. Check out the documentation here for a full list of options and use-case examples.
Below I've provided a few of my favorite features.
Try it!
Want to test out that new endpoint configuration without repeatedly modifying your /etc/hosts
file? No problem! Just supply the Host: option to specify the hostname that should be passed as part of the request.
http localhost:8000 Host: example.com
Want to see what the request looks like before sending it? Tack on the --offline
option!
Looking for a wget
-style file downloader? You got it!
http --download https://github.com/jakubroztocil/httpie/archive/master.tar.gz
Gone are the days of escaping ampersands in your query string parameters and manually URL-escaping special characters.
http --offline https://api.github.com/search/repositories q==httpie+in:name per_page==1
Wrap up
I hope you find this helpful, and please share any other command-line tools that have changed your day-to-day tasks recently! A couple of other favorites of mine are ripgrep and choose.
[ Want to test your sysadmin skills? Take a skills assessment today. ]
About the author
Jonathan Roemer is a senior DevOps engineer at Drizly with an interest in security, automation, and the human side of IT. He can usually be found hiking or reading a book on his porch.
Browse by channel
Automation
The latest on IT automation for tech, teams, and environments
Artificial intelligence
Updates on the platforms that free customers to run AI workloads anywhere
Open hybrid cloud
Explore how we build a more flexible future with hybrid cloud
Security
The latest on how we reduce risks across environments and technologies
Edge computing
Updates on the platforms that simplify operations at the edge
Infrastructure
The latest on the world’s leading enterprise Linux platform
Applications
Inside our solutions to the toughest application challenges
Original shows
Entertaining stories from the makers and leaders in enterprise tech
Products
- Red Hat Enterprise Linux
- Red Hat OpenShift
- Red Hat Ansible Automation Platform
- Cloud services
- See all products
Tools
- Training and certification
- My account
- Customer support
- Developer resources
- Find a partner
- Red Hat Ecosystem Catalog
- Red Hat value calculator
- Documentation
Try, buy, & sell
Communicate
About Red Hat
We’re the world’s leading provider of enterprise open source solutions—including Linux, cloud, container, and Kubernetes. We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.
Select a language
Red Hat legal and privacy links
- About Red Hat
- Jobs
- Events
- Locations
- Contact Red Hat
- Red Hat Blog
- Diversity, equity, and inclusion
- Cool Stuff Store
- Red Hat Summit