# httpx.ConnectError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1123) while connecting to 'http://api.example.com'

- **ID:** `python/httpx-connecterror-ssl-wrong-version`
- **Domain:** python
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Attempting to use HTTPS on a plain HTTP port, or vice versa, causing SSL handshake failure.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **Use the correct protocol (http vs https) matching the server configuration** (95% success)
   ```
   httpx.get('http://api.example.com')  # if server uses HTTP, not HTTPS
   ```
2. **Use the correct port explicitly** (90% success)
   ```
   httpx.get('https://api.example.com:443')  # ensure port 443 for HTTPS
   ```

## Dead Ends

- **Disabling SSL verification** — The issue is not certificate validation but protocol mismatch; disabling SSL does not help. (80% fail)
- **Using a different SSL/TLS version in the client** — The server likely does not support SSL on that port at all. (90% fail)
