HTTPie in Termux – Installation & Usage Commands

HTTPie is a simple command-line tool used to send HTTP requests and interact with APIs. It provides a clean and readable output, making it easier to test APIs, send data, and view responses directly from the terminal.

Installation Commands

Update Termux and install Python:

pkg update && pkg upgrade && pkg install python -y

Install HTTPie using pip:

pip install httpie

Verify installation:

http --help

Create a global command (if not accessible):

ln -s $PREFIX/bin/http $PREFIX/bin/httpie

Now you can run:

http

Usage Commands

Send a GET request:

http https://example.com

Send a POST request:

http POST https://example.com/api name=John

Send JSON data:

http POST https://example.com/api name=John age=25

Add headers:

http https://example.com Authorization:"Bearer token"

Download response to file:

http https://example.com > output.json
SHARE THIS POST: