Skip to content

izag8216/httping

Repository files navigation

httping

English | 日本語

httping header

Python 3.9+ License: MIT Tests

A minimalist, zero-dependency HTTP request tester for developers who want speed, clarity, and structured output -- without installing curl flags to memory.

Features

  • Zero Dependencies -- Uses only Python's standard library (http.client)
  • All HTTP Methods -- GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS
  • Timing Breakdown -- DNS, connect, send, wait, receive, total
  • Structured Output -- Pretty text or machine-readable JSON
  • Batch Testing -- Run multiple requests from YAML/JSON definitions
  • Regression Testing -- Compare responses against baselines with timing thresholds
  • Validation -- Assert expected status codes for CI integration
  • Authentication -- Built-in Basic auth support

Installation

From PyPI (recommended)

pip install httping-cli

From Source

git clone https://github.com/izag8216/httping.git
cd httping
pip install -e .

Standalone (no install)

python -m httping.cli get https://api.example.com

Quick Start

# Simple GET
httping get https://httpbin.org/get

# POST with JSON body
httping post https://httpbin.org/post \
  --body '{"name":"alice"}' \
  --headers "Content-Type: application/json"

# Detailed timing
httping get https://httpbin.org/get --timing

# JSON output for pipelines
httping get https://httpbin.org/get --json | jq '.status'

# Status validation (fails with exit code 1 if mismatch)
httping post https://httpbin.org/post --validate-status 201

Commands

Command Description
get / post / put / delete / patch / head / options Send HTTP request
request <METHOD> <URL> Send request with arbitrary method
batch <file> Run multiple requests from YAML/JSON
compare <baseline> Compare response against snapshot

Batch Testing

Define requests.yaml:

- url: https://api.example.com/health
  method: GET
- url: https://api.example.com/users
  method: POST
  body: '{"name":"alice"}'
  headers:
    Content-Type: application/json

Run:

httping batch requests.yaml --output results.json

Regression Testing

# Capture baseline
httping get https://api.example.com/users --json > baseline.json

# Later, compare
httping get https://api.example.com/users --json > current.json
httping compare baseline.json --against current.json --threshold 100

Documentation

Why httping?

Tool Dependencies Structured Output Timing Batch Compare
curl C binary No No No No
httpie Many Python deps Yes No No No
xh Rust binary Yes No No No
httping Zero Yes Yes Yes Yes

License

MIT -- see THIRD_PARTY_LICENSES.md for dependency audit.

About

Local HTTP Request Tester (GET/POST, Headers, Timing) -- zero-dependency Python CLI

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages