101: Switching Protocol

HTTP Status Code 101 refers to Switching Protocols. This status code indicates that the server understands and agrees to change the protocol being used, based on a request from the client.

Typically, the client sends an Upgrade header in its request, specifying a new protocol it wants to switch to (for example, upgrading from HTTP/1.1 to WebSocket). If the server supports this protocol and is willing to make the switch, it responds with 101 Switching Protocols and continues the communication using the new protocol as agreed. This code is especially useful for protocols that require a persistent connection, such as WebSocket, to enable real-time, bidirectional communication.