HTTPie does the same job as curl with shorter syntax and output that is coloured and formatted automatically. Poking at a JSON API by hand takes less than half the typing.

Install

  brew install httpie
pip install httpie
sudo apt install httpie
  

Basics

  http GET https://api.example.com/users
http https://api.example.com/users          # GET is the default
https example.com/users                     # shorthand for the https scheme
  

Responses are syntax-highlighted and JSON is formatted, so you can read them without piping through jq.

The syntax rules

SymbolMeaningExample
=JSON string fieldname=Alex
:=JSON raw type (number, boolean, array)age:=30 tags:='["a","b"]'
:HeaderAuthorization:"Bearer $TOKEN"
==Query stringpage==2
@File uploadavatar@./me.png
=@File contents as a string fieldbio=@bio.txt

Side by side with curl

  # curl
curl -X POST https://api.example.com/users \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{"name":"Alex","age":30,"active":true}'

# HTTPie
http POST api.example.com/users \
  Authorization:"Bearer $TOKEN" \
  name=Alex age:=30 active:=true
  

Content-Type: application/json is added for you.

Flags worth knowing

FlagMeaning
-vShow the full request and response
-hResponse headers only
-bResponse body only
--followFollow redirects
-dDownload to a file
-a user:passBasic auth
--session=namePersist cookies and headers in a session
--offlinePrint the request without sending it

Sessions for authentication

  http --session=prod POST api.example.com/login username=me password=secret
http --session=prod GET api.example.com/me      # cookies persist
  

Session files live in ~/.config/httpie/sessions/. Passwords can end up there in plain text, so be careful on shared machines.

When to use curl instead

SituationTool
Exploring an API on your own machineHTTPie
Inside a production server or containercurl (already there)
CI scripts and health checkscurl (-f exit-code handling)
Examples in documentationcurl (universally available)

Next

To save requests and share them with a team → Bruno and Postman

Last updated 19 Aug 2026, 00:00 UTC. history