English | 日本語
curlのフラグを暗記する必要のない、軽量で依存ゼロの HTTP リクエストテスター。
- 依存ゼロ -- Python 標準ライブラリ (
http.client) のみ使用 - 全 HTTP メソッド対応 -- GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS
- タイミング詳細 -- DNS, 接続, 送信, 待機, 受信, 合計時間
- 構造化出力 -- 見やすいテキストまたは機械可読な JSON
- バッチテスト -- YAML/JSON 定義から複数リクエストを一括実行
- 回帰テスト -- ベースラインとの比較、タイミング閾値による検証
- ステータス検証 -- CI 連携のための期待ステータスコード検証
- 認証対応 -- Basic 認証を組み込みでサポート
pip install httping-cligit clone https://github.com/izag8216/httping.git
cd httping
pip install -e .python -m httping.cli get https://api.example.com# シンプルな GET
httping get https://httpbin.org/get
# JSON ボディ付き POST
httping post https://httpbin.org/post \
--body '{"name":"alice"}' \
--headers "Content-Type: application/json"
# 詳細タイミング表示
httping get https://httpbin.org/get --timing
# パイプライン向け JSON 出力
httping get https://httpbin.org/get --json | jq '.status'
# ステータス検証(不一致時は終了コード 1)
httping post https://httpbin.org/post --validate-status 201| コマンド | 説明 |
|---|---|
get / post / put / delete / patch / head / options |
HTTP リクエスト送信 |
request <METHOD> <URL> |
任意メソッドでリクエスト送信 |
batch <file> |
YAML/JSON から複数リクエスト実行 |
compare <baseline> |
スナップショットとレスポンス比較 |
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実行:
httping batch requests.yaml --output results.json# ベースラインを取得
httping get https://api.example.com/users --json > baseline.json
# 後で比較
httping get https://api.example.com/users --json > current.json
httping compare baseline.json --against current.json --threshold 100| ツール | 依存関係 | 構造化出力 | タイミング | バッチ | 比較 |
|---|---|---|---|---|---|
curl |
C バイナリ | なし | なし | なし | なし |
httpie |
Python 多数 | あり | なし | なし | なし |
xh |
Rust バイナリ | あり | なし | なし | なし |
| httping | ゼロ | あり | あり | あり | あり |
MIT -- 依存関係の監査については THIRD_PARTY_LICENSES.md を参照。