Project: HTTP Debug CLI

Updated

September 8, 2026

Project: HTTP Debug CLI

Overview

httpdbg: curl-like teaching client with timing breakdowns.

Features

httpdbg get URL
httpdbg get -H "Accept: application/json" -v URL
httpdbg timings URL   # DNS / connect / TLS / TTFB sketch

Timings sketch

Use http.Transport + httptrace.ClientTrace:

trace := &httptrace.ClientTrace{
    DNSDone: func(info httptrace.DNSDoneInfo) { /* mark */ },
    ConnectDone: func(network, addr string, err error) {},
    GotFirstResponseByte: func() {},
}
req = req.WithContext(httptrace.WithClientTrace(ctx, trace))

Requirements

  • Timeouts
  • -o write body to file
  • Print status and selected headers on -v
  • Never follow redirects beyond -max-redir

Acceptance

go run . get -v https://example.com
go run . timings https://example.com