# context deadline exceeded (Client.Timeout exceeded while awaiting headers)

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

## Root Cause

The HTTP client timed out while waiting for the server to respond, due to a slow server or network issues.

## Version Compatibility

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

## Workarounds

1. **** (90% success)
   ```
   client := &http.Client{Timeout: 10 * time.Second}
   ```
2. **** (95% success)
   ```
   Use context.WithTimeout to set a deadline for the request
   ```

## Dead Ends

- **** — May cause the program to hang indefinitely (60% fail)
- **** — Server may still be slow, repeated timeouts (70% fail)
