Request Inspector

Capture and log incoming HTTP requests locally

A portable shell script that starts an HTTP server, captures every incoming request, and logs it as pretty-printed JSON. Think of it as a local RequestBin — no cloud service needed.

Quick Start

curl -fL windpoly.run/request-inspector.sh | sh

Or with custom options:

curl -fL windpoly.run/request-inspector.sh | sh -s -- --port 3000 --output-dir ~/requests

Features

  • Captures method, path, query params, headers, and body for every request
  • Pretty-prints each request as JSON to stdout
  • Saves each request as a JSON file in the output directory
  • Automatically parses JSON request bodies
  • Binds to 0.0.0.0 so you can receive requests from other devices on your network
  • Default port is 8000 — automatically tries the next port if it's in use (up to 10 attempts)
  • POSIX sh compatible — no bash required

Example Output

{
  "timestamp": "2026-02-11T12:00:00+00:00",
  "method": "POST",
  "path": "/webhook",
  "query_string": "",
  "query_params": {},
  "headers": {
    "Content-Type": "application/json",
    "User-Agent": "curl/8.0"
  },
  "body": "{\"key\":\"value\"}",
  "body_parsed": {
    "key": "value"
  },
  "remote_addr": "127.0.0.1",
  "content_length": 15
}

Supported Runtimes

The script tries the following in order and uses the first one found:

RuntimeRequirement
Python>= 3
Dockerdocker daemon

Expose to the Internet

Since the server binds to 0.0.0.0, it's already reachable from your local network. To receive requests from the public internet (e.g., webhooks from external services), you can use cloudflared to create a temporary tunnel:

# Install (macOS)
brew install cloudflare/cloudflare/cloudflared

# Start a tunnel to the local server
cloudflared tunnel --url http://localhost:8000

cloudflared will print a public https://*.trycloudflare.com URL that forwards traffic to your local server. The URL is temporary and goes away when you stop cloudflared. No Cloudflare account is required for these quick tunnels.

Download

Download request-inspector.sh