# Get "http://example.com": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

- **ID:** `go/http-client-timeout-while-reading`
- **Domain:** go
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The HTTP client's timeout expired while waiting for the server's response headers, possibly due to slow server or network congestion.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.21 | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   Use context.WithTimeout and set a reasonable timeout based on SLA
   ```
2. **** (80% success)
   ```
   Implement circuit breaker to stop hitting slow endpoints
   ```

## Dead Ends

- **** — May hide underlying issues and cause user frustration (40% fail)
- **** — Requests will fail consistently (90% fail)
