A simple, fast CLI tool for making HTTP requests. Like curl, but way easier to use.
Because typing curl commands sucks:
- Verbose syntax for basic stuff
- Always forgetting the -H flag placement
- Can't save common requests
- JSON responses are unreadable
- No pretty colors
# Just need Python 3.6+ and requests
pip install requests --break-system-packages
# Make it executable
chmod +x http_req.py
# Optional: Add to your PATH
sudo ln -s $(pwd)/http_req.py /usr/local/bin/http-req./http_req.py get https://api.github.com/users/octocat./http_req.py post https://api.example.com/users \
--json '{"name": "Bob", "email": "bob@example.com"}'./http_req.py post https://api.example.com/upload \
--form "file=@photo.jpg" \
--form "title=My Photo"# Bearer token
./http_req.py get https://api.example.com/protected \
--auth "Bearer your-token-here"
# Basic auth
./http_req.py get https://api.example.com/protected \
--auth "Basic dXNlcjpwYXNz"./http_req.py get https://api.example.com/data \
--header "Content-Type: application/json" \
--header "X-Custom-Header: value"# PUT
./http_req.py put https://api.example.com/users/123 \
--json '{"name": "Updated Name"}'
# DELETE
./http_req.py delete https://api.example.com/users/123# Save a request
./http_req.py save my-api get https://api.example.com/data \
--auth "Bearer token123"
# Run saved request
./http_req.py run my-api
# List all saved requests
./http_req.py list./http_req.py get https://api.example.com/data --no-curl- ✅ Supports GET, POST, PUT, DELETE
- ✅ Color-coded status codes (green=success, red=error)
- ✅ Auto-formats JSON responses
- ✅ Shows equivalent curl command
- ✅ Save and reuse common requests
- ✅ Bearer token and custom header support
- ✅ Form data and JSON payloads
- ✅ Under 300 lines of Python
- OAuth flows - too complex for v1
- File uploads - beyond simple form data
- Request history - might add in v2
- GraphQL - different beast entirely
- Certificate verification options - requests handles it
Equivalent curl command:
curl -X GET 'https://api.github.com/users/octocat'
Status: 200
Headers:
Content-Type: application/json
X-RateLimit-Remaining: 59
Response Body:
{
"login": "octocat",
"id": 1,
"name": "The Octocat",
"company": "@github"
}
- Python 3.6+
requestslibrary
That's it. No bloat.
You should! This is for when you:
- Forget curl syntax constantly
- Want pretty JSON without piping to jq
- Need to save common API calls
- Want colors in your terminal
- Value speed over power
Postman is great! But:
- This lives in your terminal
- No GUI, no account needed
- Instant startup
- Can be scripted
- Under 300 lines vs. a 200MB Electron app
MIT - Do whatever you want with it
- Lines of code: ~280
- Time to build: ~6 hours
- Dependencies: 1 (requests)
- Coffee consumed: 3 cups