Skip to content

Latest commit

 

History

History
83 lines (53 loc) · 1.88 KB

File metadata and controls

83 lines (53 loc) · 1.88 KB

HttpCaller

A simple terminal-based HTTP client built with Python, Typer, and Rich. It allows you to make HTTP requests (GET, POST, PUT, DELETE, etc.) and view request and response data with a clean, colored UI. JSON responses are syntax-highlighted with line numbers.

Features

  • Make HTTP requests using any method (GET, POST, PUT, DELETE, etc.)

  • Pass optional JSON body data with --data (-d) option

  • Pass optional HTTP headers with --header (-H) option (key:value format)

  • Pretty-print request and response data using Rich panels

  • Syntax-highlight JSON responses with line numbers

  • Handles invalid JSON responses gracefully

Installation

  1. Clone the repository:
git clone https://github.com/Poorna-Raj/Http-Caller.git
cd Http-Caller
  1. Install dependencies
pip install -r requirements.txt

Usage

Run the tool from the terminal:

python httpCaller.py METHOD URL [--d '{"key":"value"}'] [--H '{"Key":"Value"}']

Examples

  • GET Request:
python httpCaller.py GET https://jsonplaceholder.typicode.com/posts/1
  • POST request with JSON body:
python httpCaller.py POST https://jsonplaceholder.typicode.com/posts \
    --d '{"title": "Hello", "body": "World"}'
  • GET request with headers:
python httpCaller.py GET https://api.example.com/data \
    --H "Authorization: Bearer <token>"

Screenshots

  1. GET Request Screenshot of GET Request
  2. POST Request Screenshot of POST Request
  3. PUT Request Screenshot of PUT Request
  4. DELETE Request Screenshot of DELETE Request

Notes

  • JSON responses must be valid. Invalid JSON will be displayed as plain text.

  • Headers must follow the Key:Value format. Multiple headers are not supported yet.

License

MIT License © Poorna Rajapaksha