The server refuses to serve this request over the current protocol and names the one to switch to in the Upgrade header.
Defined in RFC 9110 §15.5.22 — 426 Upgrade Required · MDN reference
WebSocket endpoints receiving a normal HTTP request, servers that require a newer HTTP version, and services that refuse plaintext and require TLS.
Useful for checking that clients pinned to an old protocol fail clearly, and that a WebSocket endpoint answers plain HTTP with something more useful than 400.
Switch to the protocol in the Upgrade header and try again. For a WebSocket endpoint that means connecting with a WebSocket client, not fetch().
1 endpoint in this playground answers with 426. 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} — Return any status code on demand (200–599) (Fault Injection API) Open & run this endpointAll HTTP status codes · All 39 mock REST APIs · Getting started guide
Last updated