The client has to authenticate to gain network access — the response comes from a captive portal, not from the server you asked for.
Defined in RFC 6585 §6 — 511 Network Authentication Required · MDN reference
Hotel, airport, café and guest Wi-Fi portals that intercept every request a device makes until the user accepts the terms or logs in.
Mostly a test of resilience: an app on hotel or airport Wi-Fi receives HTML from a portal instead of JSON. Check it says "sign in to the network" instead of crashing on a parse error.
Do not parse the body as your API's response — it is not. Prompt the user to open a browser and sign in to the network, then retry.
1 endpoint in this playground answers with 511. Every one is free, needs no signup, and can be called from the browser or with curl.
GET https://funapi.dev/api/faults/v1/status/{code} — Returned on request (Fault Injection API) Open & run this endpointAll HTTP status codes · All 39 mock REST APIs · Getting started guide
Last updated