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 -yInstall HTTPie using pip:
pip install httpieVerify installation:
http --helpCreate a global command (if not accessible):
ln -s $PREFIX/bin/http $PREFIX/bin/httpieNow you can run:
httpUsage Commands
Send a GET request:
http https://example.comSend a POST request:
http POST https://example.com/api name=JohnSend JSON data:
http POST https://example.com/api name=John age=25Add headers:
http https://example.com Authorization:"Bearer token"Download response to file:
http https://example.com > output.json