HTTPie Cheat Sheet
Command syntax, headers, auth, and JSON shorthand for making human-friendly HTTP requests from the terminal with HTTPie.
1 PageBeginnerJun 9, 2026
Basic Requests
GET, POST, and method shorthand with HTTPie's simplified syntax.
bash
# GET request, pretty-printed JSON response by defaulthttps httpie.io/hello# POST with JSON body (key=value becomes JSON automatically)http POST api.example.com/orders sku=ABC123 quantity:=2# Explicit methodhttp PUT api.example.com/orders/42 status=shipped
Headers, Auth & Query Params
Common flags for authenticated, parameterized requests.
bash
# Custom header + bearer tokenhttp api.example.com/orders "Authorization:Bearer $TOKEN" "X-Request-Id:abc123"# Basic authhttp -a user:pass api.example.com/secure# Query params (== for query string)http api.example.com/orders status==shipped limit==10# Save response to a file, follow redirectshttp --download --follow api.example.com/export.csv
Item Type Suffixes
The suffix determines how HTTPie encodes each key=value pair.
- key=value- string field in JSON body
- key:=value- raw JSON value (numbers, booleans, arrays, objects)
- key==value- URL query string parameter
- key:value- HTTP header
- key@file.txt- upload file content as a form field
- key=@file.json- read field value from a file's contents
Pro Tip
Use `http --offline` to preview the exact request HTTPie would send (headers, body, URL) without actually making the call — invaluable for debugging complex `:=` JSON payloads before you fire them at a real API.
Was this cheat sheet helpful?
Explore Topics
#HTTPie#HTTPieCheatSheet#ToolsOthers#Beginner#BasicRequests#Headers#Auth#Query#Networking#CommandLine#CheatSheet#SkillVeris
Advertisement
Sri Hayavadhana Info-Tech
Professional Web Designing Services
- Responsive Websites
- E-commerce Solutions
- SEO Friendly Design
- Fast & Secure
- Support & Maintenance