Test APIs with HTTPie (the human curl)
Send GET/POST requests with readable syntax and colorized JSON responses using HTTPie's http command.
Run http POST https://api.example.com/v1/users name=Alice email=alice@example.com to send JSON to an API endpoint.
01Command
Command
$ http POST https://api.example.com/v1/users name=Alice email=alice@example.com02What it does
HTTPie builds requests from natural syntax: the method, the URL, then key=value pairs that become a JSON body (content type is set automatically), or field=value for form data. Responses are pretty-printed and colorized with headers separated from the body, which makes debugging far easier than raw curl. Common needs map to simple flags: --auth user:pass for basic auth, -v to show the full request, :8080 after the host for a port, and --headers to send only headers.
03Risk
!Warning: HTTPie defaults to JSON, so APIs expecting form-encoded or XML data need explicit flags (--form or --body from a file) — a mismatch here is the usual cause of 415 errors.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- HTTPie CLI — Usage documentationEvidence: Official docs: http METHOD URL with key=value JSON fields, --auth, --headers, and readable response formatting.
- HTTPie CLI — JSON supportEvidence: Explains how http POST with key=value items automatically serializes a JSON request body and sets the content type.
Last verified: 2026-09-18 · Category: Developer