Skip to content

AFS-Agentics/httpprobe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

httpprobe — HTTP Response Inspector

httpprobe — HTTP Response Inspector

Go Version License

httpprobe is a single-page web tool for inspecting HTTP responses with detailed timing breakdown. Paste a URL, click "Probe", and get instant insight into how a server responds — status codes, headers, body preview, and timing metrics from DNS to TTFB.


Features

  • 🔍 Full Response Inspection — Status code, headers, content type, content length, and body preview (first 10 KB)
  • ⏱️ Timing Breakdown — DNS lookup, TCP connection, TLS handshake, time to first byte (TTFB), and total request time
  • 📋 Copy as cURL — One-click generation of an equivalent curl command for any probe result
  • 🎨 Dark Theme UI — Clean, responsive dark-themed interface
  • 🔒 Secure — TLS certificate verification enabled, proper timeout handling

Quick Start

# Run directly (requires Go 1.25+)
go run github.com/afs-agentics/httpprobe@latest

# Or build and run
go build -o httpprobe .
./httpprobe

Then open http://localhost:8080 in your browser.

Options

Flag Environment Default Description
-help Show help text
PORT 8080 HTTP server port
# Custom port
PORT=9000 ./httpprobe

Usage

  1. Open the web interface at http://localhost:8080
  2. Paste a URL (e.g., https://example.com)
  3. Click Probe
  4. View the response:
    • Status — Color-coded status code and text
    • Headers — Full response headers table
    • Body — Response body preview (truncated at 10 KB)
    • Timing — Waterfall-style timing breakdown

API

httpprobe also provides a JSON API:

curl -s -X POST http://localhost:8080/probe \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://example.com"}' | jq

Response includes:

  • url — Probed URL (normalized)
  • status_code — HTTP status code
  • status_text — HTTP status text
  • headers — Response headers as key-value map
  • body_preview — First 10 KB of response body
  • body_truncated — Whether the body was truncated
  • content_type — Content-Type header
  • content_length — Content-Length header
  • timing — Object with dns_lookup, tcp_connect, tls_handshake, ttfb, total (nanoseconds), is_tls, server_name
  • curl_command — Equivalent curl command
  • redirect_chain — List of redirect URLs (if any)

Health Check

curl http://localhost:8080/health
# {"status":"ok","time":"2025-06-19T23:00:00Z"}

Technical Details

  • Zero external dependencies — uses Go standard library only
  • httptrace instrumentation — precise DNS, TCP, TLS, and TTFB timing via net/http/httptrace
  • Graceful shutdown — SIGINT/SIGTERM triggers clean shutdown
  • Timeout handling — 10-second request timeout, 5 max redirects
  • Body limit — Response bodies truncated at 10 KB for performance

Development

# Clone
git clone https://github.com/AFS-Agentics/httpprobe.git
cd httpprobe

# Run tests
go test ./... -v

# Build
go build -o httpprobe .

# Run
./httpprobe

License

MIT License — see LICENSE for details.


Built by AFS Agentics

About

HTTP Response Inspector — probe any URL and get instant response details: status, headers, body preview, and DNS/TCP/TLS/TTFB timing

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors