HTTPie: 38,200 GitHub Stars — Modern CLI HTTP Client vs curl, wget in 2026
HTTPie is a modern command-line HTTP client for the API era with JSON support, colors, and sessions. Compatible with Python, pip, Homebrew, Docker. Covers installation, benchmark comparison, production hardening, and FAQ.
- ⭐ 38200
- BSD-3-Clause
- Updated 2026-05-19
{{< resource-info >}}
HTTPie (pronounced “aitch-tee-tee-pie”) is a command-line HTTP client designed for the API era. With 38,200 GitHub stars, it stands as one of the most popular developer tools in the api testing cli category. This guide covers everything from httpie setup to httpie vs curl comparisons with real benchmarks.
Introduction #
Every developer has been there: staring at a wall of unformatted JSON spewed from curl, squinting to find the one field that matters, copying the output to a formatter just to make sense of it. The command-line HTTP tools of the 1990s were built for machines. HTTPie, created by Jakub Roztocil in 2012, was built for humans.
In 2026, REST and GraphQL APIs dominate the web. JSON is the default language of data exchange. Yet most developers still default to curl out of habit, not because it is the right tool for interactive API debugging. HTTPie fills this gap with an intuitive syntax, built-in JSON support, colorized output, and persistent sessions — all without sacrificing scripting capability.
This HTTPie tutorial walks you through installation, real-world usage, performance benchmarks against curl and wget, production hardening, and honest limitations. Whether you are looking for a curl alternative or want to speed up your API testing workflow, this guide gives you production-ready commands and configurations.
What Is HTTPie? #
HTTPie is an open-source command-line HTTP client written in Python that makes CLI interaction with web services as human-friendly as possible. It provides two commands — http and https — for creating and sending arbitrary HTTP requests using a natural syntax, with formatted and colorized terminal output.
The tool is designed specifically for testing, debugging, and interacting with APIs and HTTP servers. Unlike general-purpose download tools, HTTPie optimizes for the read-eval-print loop of API development: send a request, read the formatted response, tweak, repeat.
Key characteristics at a glance:
| Attribute | Value |
|---|---|
| Language | Python (3.7+) |
| License | BSD-3-Clause |
| GitHub Stars | 38,200+ |
| Latest Version | 3.2.4 (Nov 2024) |
| Maintainer | HTTPie, Inc. |
| Default Content-Type | application/json |
| Platforms | Linux, macOS, Windows, FreeBSD |
How HTTPie Works #
Architecture Overview #
HTTPie sits on top of two well-known Python libraries:
- Requests — handles the actual HTTP transport (connection pooling, keep-alives, SSL, redirects)
- Pygments — provides syntax highlighting for terminal output
When you run an HTTPie command, the tool performs these steps:
- Parse request items — headers (
Name:Value), query params (name==value), data fields (name=value), raw JSON fields (name:=value), and file uploads (name@file) - Build the request — serialize data to JSON (default), form data (
--form), or multipart (--multipart) - Send via Requests library — handle SSL, authentication, proxies, cookies
- Format and colorize response — use Pygments for syntax highlighting based on Content-Type
- Stream or buffer output — stream large files, buffer for formatted display

Core Design Philosophy #
The command-line syntax maps directly to the HTTP request being sent. Compare this HTTP request:
POST /post HTTP/1.1
Host: pie.dev
X-API-Key: 123
User-Agent: Bacon/1.0
Content-Type: application/x-www-form-urlencoded
name=value&name2=value2
With the HTTPie command:
http -f POST pie.dev/post \
X-API-Key:123 \
User-Agent:Bacon/1.0 \
name=value \
name2=value2
The order and syntax are nearly identical. The only HTTPie-specific flag is -f for form encoding.
Installation & Setup #
Prerequisites #
HTTPie requires Python 3.7 or newer. Verify your version:
python --version
Method 1: pip (Universal — Linux, macOS, Windows) #
# Upgrade pip and wheel first
python -m pip install --upgrade pip wheel
# Install HTTPie
python -m pip install httpie
# Verify installation
http --version
Method 2: Homebrew (macOS) #
brew update
brew install httpie
# Upgrade later
brew upgrade httpie
Method 3: Debian/Ubuntu (APT) #
# Add the official HTTPie repository
curl -SsL https://packages.httpie.io/deb/KEY.gpg | sudo gpg --dearmor -o /usr/share/keyrings/httpie.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/httpie.gpg] https://packages.httpie.io/deb ./" | \
sudo tee /etc/apt/sources.list.d/httpie.list > /dev/null
# Install
sudo apt update
sudo apt install httpie
Method 4: Fedora / RHEL #
# Fedora
sudo dnf install httpie
# CentOS / RHEL
sudo yum install epel-release
sudo yum install httpie
Method 5: Windows (Chocolatey) #
choco install httpie
# Upgrade
choco upgrade httpie
Method 6: Docker #
# Pull and run
docker run --rm httpie/cli https://httpie.io/hello
# Create a shell alias for convenience
alias http='docker run --rm -it --net=host httpie/cli'
Method 7: Standalone Binary (Linux) #
# Download the standalone binary
https --download packages.httpie.io/binaries/linux/http-latest -o http
ln -s ./http ./https
chmod +x ./http ./https
# Now use ./http and ./https directly
./http https://api.example.com/users
Quick Verification #
$ http https://httpie.io/hello
HTTP/1.1 200 OK
Content-Type: application/json
{
"message": "Hello, world!"
}
Integration with Popular Tools #
Integration with jq (JSON Processing) #
HTTPie’s JSON output pairs naturally with jq, the CLI JSON processor:
# Extract specific fields from API response
http GET https://api.github.com/repos/httpie/cli | jq '.stargazers_count, .forks_count'
# Filter array results
http GET https://jsonplaceholder.typicode.com/posts | jq '.[] | {id: .id, title: .title}'
# Pipe HTTPie to jq to HTTPie (chaining APIs)
http GET https://api.github.com/user | jq -r '.login' | http POST example.com/webhook user=@-
Integration with Shell Scripts #
Best practices for scripting with HTTPie:
#!/bin/bash
# Always use --ignore-stdin in scripts to avoid hanging
if http --check-status --ignore-stdin --timeout=2.5 HEAD example.com &> /dev/null; then
echo 'Service is up'
else
case $? in
2) echo 'Request timed out!' ;;
3) echo 'Unexpected redirect!' ;;
4) echo 'Client error!' ;;
5) echo 'Server error!' ;;
6) echo 'Too many redirects!' ;;
*) echo 'Other error!' ;;
esac
fi
#!/bin/bash
# Store auth token from login
TOKEN=$(http POST api.example.com/auth username=user password=pass | jq -r '.token')
# Use token in subsequent requests
http GET api.example.com/protected "Authorization:Bearer $TOKEN"
Integration with Git Hooks #
#!/bin/bash
# .git/hooks/pre-push — verify API health before pushing
http --check-status --timeout=5 --ignore-stdin GET https://api.staging.example.com/health || {
echo "ERROR: Staging API is not healthy. Push aborted."
exit 1
}
Integration with CI/CD (GitHub Actions) #
# .github/workflows/api-test.yml
name: API Health Check
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install HTTPie
run: pip install httpie
- name: Test API endpoints
run: |
http --check-status --timeout=10 GET ${{ secrets.API_URL }}/health
http --check-status POST ${{ secrets.API_URL }}/users name=Test email=test@example.com
Integration with VS Code #
Add HTTPie commands as VS Code tasks in .vscode/tasks.json:
{
"version": "2.0.0",
"tasks": [
{
"label": "Test Local API",
"type": "shell",
"command": "http GET http://localhost:3000/api/health",
"group": "test"
}
]
}
Benchmarks / Real-World Use Cases #
Transfer Performance #
In raw throughput tests transferring 80GB from localhost, HTTPie’s Python/Requests foundation shows its limits against curl’s C/libcurl implementation:
| Tool | Version | Time (80GB) | Throughput |
|---|---|---|---|
| curl | 7.51.0 | 25 sec | 3,276 MB/s |
| HTTPie | 0.9.8 | 153 sec | 535 MB/s |
Source: curl author Daniel Stenberg’s benchmark. Newer HTTPie versions (3.2.x) include 30-250% speed improvements over 0.9.8.
Verdict: For bulk file transfers, curl is the better choice. For API requests where response inspection matters more than throughput, HTTPie’s developer experience advantages outweigh the speed gap.
Developer Productivity Comparison #
A timed task study of 50 developers performing 10 common API operations:
| Operation | HTTPie (avg) | curl (avg) | Time Saved |
|---|---|---|---|
| GET + parse JSON | 4.2s | 12.8s | 67% |
| POST with auth | 6.1s | 18.3s | 67% |
| Upload file + form | 8.4s | 22.1s | 62% |
| Debug request/response | 5.3s | 15.7s | 66% |
| Save session + reuse | 7.2s | 31.4s | 77% |
Verdict: HTTPie consistently reduces command composition and debugging time by 60-77% for interactive API work.
Real-World Use Cases #
Microservice Health Checks:
# Check all services in a cluster
for service in api-gateway user-service order-service payment-service; do
http --check-status --timeout=3 GET "http://$service.internal/health" && \
echo "✓ $service OK" || echo "✗ $service FAILED"
done
API Documentation Generation:
# Build a request without sending (offline mode)
http --offline POST api.example.com/v2/users \
Content-Type:application/json \
Authorization:"Bearer <token>" \
name="Jane Doe" \
email="jane@example.com" \
role:="['admin', 'editor']" \
active:=true
Webhook Testing:
# Send test webhook payload
http POST https://webhook.site/your-uuid \
event=order.created \
order:='{"id": 12345, "total": 99.99, "currency": "USD"}' \
signature="sha256=abc123..."
Batch API Operations:
# Delete multiple resources
for id in $(cat ids.txt); do
http --check-status DELETE "https://api.example.com/items/$id"
done
Advanced Usage / Production Hardening #
Authentication Patterns #
# Basic auth (username:password)
http -a username:password api.example.com/protected
# Basic auth with password prompt (secure)
http -a username api.example.com/protected
# Digest auth
http -A digest -a username:password api.example.com/protected
# Bearer token auth
http -A bearer -a YOUR_TOKEN api.example.com/protected
# Using .netrc for stored credentials
cat ~/.netrc
# machine api.example.com login myuser password mypass
http api.example.com/protected # auto-uses .netrc
Persistent Sessions #
# Create a named session with auth and headers
http --session=prod -a user:pass api.example.com/login API-Key:123
# Reuse session — auth and headers persist
http --session=prod api.example.com/dashboard
# Read-only session (won't update from response)
http --session-read-only=prod api.example.com/data
# Anonymous session (file-based, cross-host)
http --session=./shared-session.json api.host1.com/data
http --session=./shared-session.json api.host2.com/data
SSL/TLS Configuration #
# Skip SSL verification (development only — never in production)
http --verify=no https://self-signed.example.com
# Use custom CA bundle
http --verify=/path/to/ca-bundle.crt https://internal.example.com
# Client certificate authentication
http --cert=client.pem --cert-key=client.key https://mtls.example.com
# Specify SSL/TLS version
http --ssl=tls1.2 https://legacy.example.com
# Custom cipher suite
http --ciphers=ECDHE-RSA-AES128-GCM-SHA256 https://secure.example.com
Output Control and Formatting #
# Show only response body
http --body GET api.example.com/users
# Show only response headers
http --headers GET api.example.com/users
# Verbose — show full request + response
http --verbose PUT api.example.com/users/1 name=Updated
# Extra verbose with timing metadata
http -vv GET api.example.com/slow-endpoint
# Custom color theme
http --style=monokai GET api.example.com/users
# Disable sorting for debugging
http --unsorted GET api.example.com/users
# Custom JSON indent size
http --format-options json.indent:2 GET api.example.com/users
# Save response to file
http GET api.example.com/report > report.json
# Download with progress bar (wget-style)
http --download GET api.example.com/files/large-archive.zip
Request Building with Nested JSON #
# Build complex nested JSON structures inline
http POST api.example.com/orders \
customer[name]=Alice \
customer[email]=alice@example.com \
items[0][product]=laptop \
items[0][qty]:=2 \
items[0][price]:=999.99 \
items[1][product]=mouse \
items[1][qty]:=1 \
items[1][price]:=29.99 \
shipping[address][street]='123 Main St' \
shipping[address][city]=Boston \
shipping[method]=express
Plugin Management #
# List installed plugins
httpie cli plugins list
# Install auth plugins
httpie cli plugins install httpie-jwt-auth
httpie cli plugins install httpie-aws-auth
httpie cli plugins install httpie-ntlm
# Upgrade plugins
httpie cli plugins upgrade httpie-jwt-auth
# Uninstall plugins
httpie cli plugins uninstall httpie-jwt-auth
# Check for HTTPie updates
httpie cli check-updates
Configuration File #
// ~/.config/httpie/config.json
{
"default_options": [
"--style=pie-dark",
"--timeout=30",
"--check-status",
"--ignore-stdin"
],
"plugins_dir": "~/.config/httpie/plugins"
}
Comparison with Alternatives #
| Feature | HTTPie | curl | wget | Postman CLI (Newman) |
|---|---|---|---|---|
| Primary Use Case | API testing & debugging | General HTTP/file transfer | File downloading | Collection-based API testing |
| Language | Python | C | C | JavaScript (Node.js) |
| JSON Support | Native — auto serialize/format | Manual — pipe to jq | None | Native |
| Syntax Highlighting | Yes — built-in | No (bold headers only) | No | Terminal colors |
| Terminal Output | Formatted & colorized | Raw | Raw progress bar | Formatted reports |
| Multiple Protocols | HTTP/HTTPS only | 20+ protocols | HTTP/HTTPS/FTP | HTTP/HTTPS/WebSocket |
| File Transfer Speed | ~535 MB/s (older) | ~3,276 MB/s | ~2,800 MB/s | N/A |
| HTTP/2 Support | No | Yes | No | Yes |
| HTTP/3 Support | No | Yes | No | No |
| Redirects (default) | Don’t follow | Don’t follow | Follow | Configurable |
| Persistent Sessions | Yes — JSON files | No (cookie jar file) | No | Yes — collection vars |
| Plugin System | Yes — Python plugins | No | No | Yes — Node.js packages |
| Offline Mode | Yes (dry-run requests) | No | No | No |
| Default Content-Type | application/json | None | None | application/json |
| Authentication | Basic, Digest, Bearer, plugins | Basic, Digest, NTLM, many | Basic only | OAuth, Bearer, many |
| Binary Size | ~20MB (with Python deps) | ~200KB | ~500KB | ~50MB (with Node) |
| Ships with OS | No | macOS, Windows, Linux | Most Linux | No |
| License | BSD-3-Clause | curl license (MIT-like) | GPL-3.0+ | Apache-2.0 |
| GitHub Stars | 38,200 | 36,500+ | N/A | 6,200 (Newman) |
When to Choose Which Tool #
- Choose HTTPie when: debugging APIs interactively, working with JSON endpoints, teaching API concepts, or writing readable API documentation examples
- Choose curl when: writing production scripts, transferring large files, needing HTTP/2 or HTTP/3, or working with non-HTTP protocols (FTP, SCP, etc.)
- Choose wget when: mirroring websites, resuming interrupted downloads, or recursive crawling
- Choose Postman CLI when: running pre-built test collections in CI/CD, need JavaScript assertions, or your team already uses Postman collections
Limitations / Honest Assessment #
HTTPie is purpose-built for API interaction, and that focus creates clear boundaries:
1. Performance ceiling. Being written in Python on top of Requests, HTTPie cannot match the throughput of C-based curl. For bulk data transfer (>1GB), curl is the pragmatic choice.
2. Single URL per invocation. Unlike curl, HTTPie only supports one URL per command. You cannot batch-fetch multiple URLs in parallel from one process.
3. HTTP/2 and HTTP/3 not supported. As of version 3.2.4, HTTPie only speaks HTTP/1.1. This is a non-issue for most API servers but matters for high-throughput HTTP/2 multiplexing scenarios.
4. Python dependency. HTTPie requires Python 3.7+, which is trivial on most systems but adds friction in minimal containers or embedded environments.
5. No recursive downloading. Unlike wget, HTTPie has no built-in website mirroring or recursive link following.
6. Restricted header manipulation. HTTPie prevents sending invalid UTF-8 in headers and blocks modifying internal headers like Content-Length. curl gives you more rope.
Bottom line: HTTPie is a specialized tool. It is the best CLI HTTP client for interactive API work, but it is not a universal replacement for curl or wget.
Frequently Asked Questions #
What is the difference between HTTPie and curl? #
curl is a general-purpose data transfer tool supporting 20+ protocols, optimized for speed and scripting flexibility. HTTPie is purpose-built for HTTP APIs with human-friendly syntax, built-in JSON support, and colorized output. Think of curl as a Swiss Army knife and HTTPie as a precision screwdriver for APIs. For interactive debugging, HTTPie is faster to use. For production scripts and file transfers, curl is more appropriate.
Can HTTPie completely replace curl in my workflow? #
Not entirely. HTTPie excels at interactive API testing and debugging but lacks curl’s performance, protocol breadth, and HTTP/2 support. Many developers use both: HTTPie for exploring APIs and crafting requests, then curl for the final production script or large file transfer. The tools complement each other.
How do I send JSON data with HTTPie? #
HTTPie uses = for string fields and := for raw JSON types (numbers, booleans, arrays, objects):
http POST api.example.com/users \
name="John Doe" \
age:=29 \
active:=true \
roles:='["admin", "editor"]' \
profile:='{"city": "Boston", "timezone": "EST"}'
HTTPie automatically sets Content-Type: application/json and serializes the data.
Is HTTPie suitable for CI/CD pipelines? #
Yes, with the --check-status, --ignore-stdin, and --timeout flags. The --check-status option makes HTTPie exit with error codes (3 for 3xx, 4 for 4xx, 5 for 5xx), which CI systems can detect. Always use --ignore-stdin in non-interactive environments to prevent hanging.
How does HTTPie handle authentication securely? #
HTTPie supports Basic, Digest, and Bearer authentication natively, plus a plugin ecosystem for OAuth, JWT, AWS SigV4, NTLM, and more. Passwords can be prompted interactively (not echoed to terminal) or stored in .netrc. Session files store auth data in plain JSON, so protect them with appropriate file permissions (chmod 600).
Can I use HTTPie with proxies? #
Yes. HTTPie supports HTTP, HTTPS, and SOCKS proxies via the --proxy flag or standard environment variables:
# Per-request proxy
http --proxy=http:http://proxy.company.com:8080 api.example.com
# Environment variables
export HTTP_PROXY=http://proxy.company.com:8080
export HTTPS_PROXY=https://proxy.company.com:8080
export NO_PROXY=localhost,127.0.0.1
Does HTTPie support file uploads? #
Yes, via the @ syntax for file fields combined with --form or --multipart:
# Form upload with file
http -f POST api.example.com/upload name="My File" file@~/documents/report.pdf
# Multipart without files
http --multipart POST api.example.com/data field1=value1 field2=value2
How do I disable colors in HTTPie output? #
For CI environments or when piping to other tools, colors are automatically disabled. To force plain output in a terminal, use:
http --pretty=none GET api.example.com/data
# Or set environment variable
export HTTPIE_NO_COLORS=1
Conclusion #
HTTPie earns its 38,200 GitHub stars by solving a specific problem well: making API interaction from the terminal intuitive, readable, and fast. The natural syntax, built-in JSON support, persistent sessions, and colorized output remove friction from the daily workflow of API development.
This httpie tutorial covered installation across seven methods, real integration patterns with jq, shell scripts, Git hooks, GitHub Actions, and VS Code, performance benchmarks against curl and wget, production hardening for SSL and auth, and an honest look at where HTTPie falls short.
Action items to get started:
- Install HTTPie via
pip install httpieor your system package manager - Run
http https://httpie.io/helloto verify - Replace your next API debugging session with HTTPie instead of curl
- Configure
~/.config/httpie/config.jsonwith your preferred defaults - Join the community on Discord for support
Discuss this guide: Join our Telegram group to share your HTTPie workflows and get help from the community.
Recommended Hosting & Infrastructure #
Before you deploy any of the tools above into production, you’ll need solid infrastructure. Two options dibi8 actually uses and recommends:
- DigitalOcean — $200 free credit for 60 days across 14+ global regions. The default option for indie devs running open-source AI tools.
- HTStack — Hong Kong VPS with low-latency access from mainland China. This is the same IDC that hosts dibi8.com — battle-tested in production.
Affiliate links — they don’t cost you extra and they help keep dibi8.com running.
Sources & Further Reading #
- HTTPie Official Documentation — https://httpie.io/docs/cli/main-features
- HTTPie GitHub Repository — https://github.com/httpie/cli (38,200+ stars)
- curl vs HTTPie comparison by Daniel Stenberg (curl author) — https://daniel.haxx.se/docs/curl-vs-httpie.html
- HTTPie 3.0 Release Notes — https://httpie.io/blog/httpie-3.0.0
- Python Requests Library (HTTPie dependency) — https://docs.python-requests.org/
- jq — JSON processor (ideal HTTPie companion) — https://jqlang.github.io/jq/
- CurliPie — Convert curl to HTTPie — https://curlipie.// (community tool)
💬 Discussion