A powerful command-line HTTP request analyzer that performs HEAD requests and provides detailed timing information for each step of the connection process. Perfect for debugging network issues, analyzing website performance, and understanding HTTP connection behavior.
- Detailed Connection Timing: DNS lookup, TCP connection, TLS handshake, and time-to-first-byte metrics
- Redirect Following: Automatically follows HTTP redirects with timing for each hop
- Resource Size Analysis: Calculate total page size including all linked resources (CSS, JS, images)
- Multiple Output Formats: Text (default), JSON, and CSV for integration with other tools
- Concurrent Resource Fetching: Configurable concurrency for faster resource analysis
- TLS/SSL Information: Certificate details, cipher suites, and protocol versions
- Connection Reuse Detection: Shows when connections are reused vs. newly established
- HTTP Protocol Detection: Automatically detects HTTP/1.1, HTTP/2, and HTTP/3
Download the latest release for your platform from the releases page.
git clone https://github.com/earentir/headview.git
cd headview
go build -o headview .go install github.com/earentir/headview@latestheadview https://example.comheadview https://example.com --headersheadview https://example.com --sizeheadview https://example.com --jsonheadview https://example.com --csvheadview https://example.com --size --concurrent 20URL: https://example.com
Response status: 200 OK
Last Modified: Wed, 21 Oct 2015 07:28:00 GMT
Content size: 1.25 KB
New connection established for this request
Connection #1
Connection: New
Local address: 192.168.1.100:54321
Remote address: 93.184.216.34:443
DNS lookup: 23.45ms
TCP connection: 45.67ms
TLS handshake: 89.12ms
TLS version: TLS 1.3
TLS cipher: TLS13-AES-128-GCM-SHA256
TLS resumption: false
Waiting for server: 12.34ms
Time To First Byte: 156.78ms
Protocol: HTTPS
HTTP version: HTTP/2
Request
Request sending: 1.23ms
Server processing: 67.89ms
Content transfer: 45.67ms
████████████████████████████ 0.16 ┼
Total request: 160.00ms
{
"url": "https://example.com",
"status_code": 200,
"status": "200 OK",
"content_size": 1256,
"timings": {
"common_timings": [
{
"dns_lookup_time": "23450000ns",
"tcp_conn_time": "45670000ns",
"tls_handshake_time": "89120000ns",
"ttfb": "156780000ns",
"tls_version": "TLS 1.3",
"tls_cipher_suite": "TLS13-AES-128-GCM-SHA256",
"connection_reused": false,
"protocol": "HTTPS",
"http_version": "HTTP/2"
}
],
"request_sending_time": "1230000ns",
"server_processing_time": "67890000ns",
"total_request_time": "160000000ns",
"content_transfer_time": "45670000ns"
},
"timestamp": "2024-01-18T12:34:56Z",
"version": "0.1.18"
}| Flag | Short | Description |
|---|---|---|
--headers |
Include response headers in output | |
--size |
Calculate and display sizes of all page resources | |
--concurrent N |
Maximum concurrent requests for size calculation (default: 5) | |
--json |
Output in JSON format | |
--csv |
Output in CSV format | |
--version |
-v |
Show version information |
--help |
-h |
Show help information |
0: Success1: General error (legacy)2: Command line argument error3: Network/HTTP error
headview automatically follows redirects and shows timing information for each hop:
headview http://bit.ly/exampleUse CSV output to compare performance across multiple sites:
for site in example.com google.com github.com; do
headview https://$site --csv --quiet
done > performance.csvThe JSON output makes it easy to integrate with monitoring and alerting systems:
# Check if response time exceeds threshold
response_time=$(headview https://api.example.com --json | jq '.timings.total_request_time | tonumber / 1000000')
if (( $(echo "$response_time > 1000" | bc -l) )); then
echo "Slow response: ${response_time}ms"
exit 1
fi- By default, headview skips TLS certificate verification for testing purposes
- For production monitoring, consider implementing certificate validation
- Be mindful of rate limiting when using with high concurrency
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
This project is licensed under the GNU General Public License v2.0 - see the LICENSE file for details.