What HTTPie is for
curl is unbeatable for scripting. HTTPie is what you reach for when you're exploring an API by hand: shorter syntax, JSON-aware, syntax-highlighted output. brew install httpie.
Sane defaults
http https://api.github.com/users/cli
# Same as: curl -sS -H 'Accept: application/json' https://...HTTPie defaults to JSON-friendly Accept header, follows redirects less aggressively, prints colored JSON. The output reads like documentation.
POST in 30 seconds
http POST https://api.example/items name=sample qty:=3 active:=trueReads as: "POST to that URL, with JSON body {name: 'sample', qty: 3, active: true}." The := is for non-string values (numbers, booleans). Plain = is string. No need to quote the JSON yourself.
Headers, auth, files
http GET https://... 'Authorization: Bearer xyz'http -a user:pass GET https://...http POST https://... < body.json— body from a file via stdin.http --download https://.../file.zip— progress bar, filename auto-detect.
Sessions
http --session=mysession POST https://api/login user=alice pass=... saves cookies, headers, and base auth. Subsequent http --session=mysession ... calls reuse them. Useful for multi-step API explorations.
When curl still wins
Scripts that have to run on minimal containers (no Python). Performance-critical loops. Tools that already use curl. For everything else — especially when you're at a prompt — HTTPie is the friendly default.
Keep access to the bytes behind friendly output
HTTPie's color and formatting help people, but can hide raw bytes, repeated headers, or redirect chains. Save verbose or raw output and the actual status when reproducing a protocol problem.
Do not mistake shell convenience syntax for a protocol
Input forms such as name=value may invoke client-side JSON type rules. Verify string, number, and file-upload semantics for the installed version, and reproduce important requests with an explicit body and content type.