MockFoxAdvertise

HTTP 101 Switching Protocols

Updated Free mock REST & WebSocket APIs

HTTP 101 Switching Protocols — The server agrees to switch to the protocol the client asked for in the Upgrade header.

Class
1xx Informational
Defined in
RFC 9110 §15.2.2
Official
Yes (IANA registry)

What does HTTP 101 mean?

Almost always seen when opening a WebSocket: the browser sends Upgrade: websocket and the server answers 101 with Connection: Upgrade, after which the TCP connection carries WebSocket frames instead of HTTP. Reverse proxies must forward the Upgrade and Connection headers (in nginx: proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade";) or the handshake fails with 400 or 502.

Handling 101

  1. Visitors: You'll never see this in a browser — it's an interim response handled automatically before the final status.
  2. Developers: Your HTTP client handles 1xx responses internally; fetch() never exposes them. Inspect them with curl -v or a packet capture.

Example 101 response

HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=

1xx Informational: Interim responses: the request was received and processing continues. See the full list of HTTP status codes.

Related status codes

Related tools

Frequently asked questions

What does HTTP 101 Switching Protocols mean?

The server agrees to switch to the protocol the client asked for in the Upgrade header.

Is 101 an error?

No. 101 is an informational interim response; a final status follows.

Where is 101 defined?

In RFC 9110 §15.2.2. It's listed in the IANA HTTP Status Code Registry.