HTTP 426 Upgrade Required
The server refuses the request using the current protocol but might accept it after a protocol upgrade.
4xx Client Error
426
Upgrade Required
Description
The 426 Upgrade Required status code indicates that the server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol. The server must send an Upgrade header field in the 426 response to indicate the required protocol(s). This status code is used when a server requires a newer or different protocol to handle the request. For example, a server might require the client to upgrade from HTTP/1.1 to HTTP/2, or from HTTP to WebSocket for certain operations.
When Is It Used?
Returned when the server requires the client to switch to a different protocol. For example, when an endpoint only supports WebSocket connections and receives a regular HTTP request, or when an API requires HTTP/2 features.
Example Response
HTTP/1.1 426 Upgrade Required
Upgrade: HTTP/2.0
Connection: Upgrade
Content-Type: text/plain
This service requires HTTP/2.