bnixon67/http-latency — reverse-engineered prompt
Reverse engineered prompt
Build me a small Go command line tool called http latency that checks how long a single web request takes.
I want to run it with a URL, like go run . https://example.com, and have it make one GET request, then print a simple readable breakdown. Show the request method and URL, the HTTP status, how many bytes were read, and timing for DNS lookup, TCP connect, TLS handshake for HTTPS, first response byte, and total time including reading the full response body.
Only accept http:// and https:// URLs. Use a default timeout of 5 seconds, but let me pass a custom timeout like -timeout 750ms or -timeout 2s. Reject zero or negative timeouts with a clear error.
Please don’t follow redirects. If the server returns one, show that status and print the Location header. Keep the output clean and similar to a small diagnostic tool someone could use from a terminal.
Want more depth? Deep Reverse