0
HTTPie is an intuitive command-line HTTP client built as an alternative to cURL, offering human-friendly syntax, formatted output, and automatic JSON processing.
How to test API endpoints using HTTPie CLI?
Unlike cURL, HTTPie automatically formats JSON responses and sets appropriate headers.
1. Installing HTTPie
pip install httpie2. Sending a GET Request
http GET https://api.example.com/v1/products Category==Electronics3. Sending a POST Request with JSON Data
Fields can be passed directly as key-value pairs without writing raw JSON strings:
http POST https://api.example.com/v1/products \
Authorization:"Bearer YOUR_TOKEN" \
title="Wireless Mouse" \
price:=29.99HTTPie automatically sets Content-Type: application/json when key-value syntax is used.