101 Switching Protocols
Explanation:
The 101 Switching Protocols status code indicates that the server understands and is willing to comply with the client's request, via the Upgrade header field, to switch protocols. This is sent in response to a client's request that includes an Upgrade request header to indicate the protocol it wishes to switch to.
Usage:
This status code is used primarily to switch from HTTP to a protocol with different features, like WebSocket.
Attentions:
- The server must ensure the switch can be made before sending this response.
- The server must send an Upgrade header in the response to indicate the protocol it switched to.
Sample:
undefined