ApiSimul logo ApiSimul — the switchboard

HTTP 101 — Switching Protocols

HTTP 101 confirms that both sides agree to abandon HTTP for this connection and speak something else instead — most famously WebSocket, where the client requests the upgrade and the server answers 101 before the socket turns into a two-way channel.

When 101 shows up

Mocking a 101 response

A response with this status can be faked end to end with a local mock rule — no backend changes needed. The configuration below mirrors the rule fields the ApiSimul editor uses (method, path, status, delay in milliseconds, response body):

{
  "method": "GET",
  "path": "/ws/chat",
  "status": 101,
  "delay": 60,
  "enabled": true,
  "body": null
}

Dynamic placeholders such as {{random.name}}, {{string.uuid}} or {{number.int 1 100}} can appear inside the body to vary each response, which keeps client-side list rendering and retry logic honest during development.

Frequently asked questions

What does HTTP 101 mean?
The server is switching to a different protocol as requested by the client. After this response the bytes on the wire no longer follow HTTP semantics.

How can I test a 101 response without a real backend?
Define a mock rule with the method and path your client requests and set the status to 101. The example configuration above returns this response after the listed delay, so the client exercises its 101 handling exactly as it would against a live server.

Related status codes

Need the response in your own project? Spin up rules for any status with the ApiSimul mock server, or browse every status code page.