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. ]
Sull'autore
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.
Altri risultati simili a questo
Data-driven automation with Red Hat Ansible Automation Platform
More than meets the eye: Behind the scenes of Red Hat Enterprise Linux 10 (Part 4)
Technically Speaking | Taming AI agents with observability
You Can't Automate The Fire | Code Comments
Ricerca per canale
Automazione
Novità sull'automazione IT di tecnologie, team e ambienti
Intelligenza artificiale
Aggiornamenti sulle piattaforme che consentono alle aziende di eseguire carichi di lavoro IA ovunque
Hybrid cloud open source
Scopri come affrontare il futuro in modo più agile grazie al cloud ibrido
Sicurezza
Le ultime novità sulle nostre soluzioni per ridurre i rischi nelle tecnologie e negli ambienti
Edge computing
Aggiornamenti sulle piattaforme che semplificano l'operatività edge
Infrastruttura
Le ultime novità sulla piattaforma Linux aziendale leader a livello mondiale
Applicazioni
Approfondimenti sulle nostre soluzioni alle sfide applicative più difficili
Virtualizzazione
Il futuro della virtualizzazione negli ambienti aziendali per i carichi di lavoro on premise o nel cloud