Luke Oliff.

TIL: Debugging APIs With httpie

·TIL·1 min read·Luke Oliff

curl is universal. httpie is readable. For exploratory API work, httpie saves time.

http POST https://api.example.com/v1/listen Authorization:"Bearer $TOKEN" < audio.wav

httpie highlights JSON responses, shows headers, and formats the output by default. No piped jq needed for basic exploration.

http GET https://api.example.com/v1/models

A GET request with coloured JSON output. The response body is syntax highlighted.

http --follow --timeout 30 GET https://api.example.com/v1/status

Follow redirects and set a custom timeout. Flags are the same category as curl but shorter to type.

How do I install httpie?

brew install httpie

Does httpie handle file uploads?

Yes. Use the redirect syntax as shown above or specify the content type explicitly with the Content-Type header.