HTTP 511 Network Authentication Required (RFC 6585) indicates the client needs to authenticate to gain network access. This is the status code for captive portals — the WiFi login pages at hotels, airports, and coffee shops. When you connect to a WiFi network that requires authentication, the network intercepts your HTTP requests and returns 511 with the login page. This is distinct from 401 (server authentication) — 511 is about network-level access.
Response includes the status code, standard headers (including Content-Type), and a small diagnostic JSON body describing the request and returned status.
Simulator URL (copy in the app after load — not a normal link):
https://httpstatus.com/api/status/511
Example request:
curl -i "https://httpstatus.com/api/status/511"