Skip to content
The HTTP Cabinet

/static/gabinete/en/curiosidade/101/

Menu

HTP-002 · Informational (1xx)

101 Switching Protocols

The handshake that turns HTTP into something else — WebSocket, almost always.

The client asks with the Upgrade header; the server agrees with a 101 — and, from the next blank line on, the same connection speaks another protocol. It is HTTP/1.1's official exit door.

Every in-browser chat, every multiplayer game, every development-environment hot-reload: the WebSocket starts with a 101. It is the most returned code in this drawer — and nobody looks at it, because by the time it shows up, it has already worked.

HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=
After this response, the connection no longer speaks HTTP.