HTTP 101 status code


The English name of HTTP 101 status code is Switching Protocols, which means switching protocols. The server switches protocols based on the client's request. You can only switch to a higher-level protocol, for example, to a new version of HTTP.

The server has understood the client's request and will notify the client through the Upgrade message header to use a different protocol to complete the request. After sending the last blank line of this response, the server will switch to the protocols defined in the Upgrade header.

Similar measures should only be taken when it is more beneficial to switch to a new protocol. For example, there are advantages to switching to a new HTTP version over an older version, or switching to a real-time and synchronous protocol for delivering resources that take advantage of such features.