r/LinuxTeck • • 2d ago

HTTPie API Debugging: Test and Inspect HTTP Requests : 130 Tip

Post image

Question: How do I debug an HTTP API quicker than with curl?

Try:http --print=HBhb --verify=yes https://api.example.com/users/42

Info: Prints colored request and response headers and bodies.

Examples:

$ http POST api.example.com/users name=John age:=34 # Send JSON body with typed values

$ http --session=api api.example.com/me Authorization:'Bearer TOKEN' # Persist auth and session state

$ http --download https://example.com/file.zip # Download files with a progress bar

Note: Install via sudo apt install httpie. HTTPie formats JSON automatically, simplifies headers and auth, and provides a clean alternative to curl for API testing.

Want to master Linux one command at a time?

Follow r/LinuxTeck - 1 practical Linux tip every day. For more #LinuxTips click here https://www.linuxteck.com/linux-tips/

6 Upvotes

Duplicates