101 Switching Protocols

Look up a status, pick the right one for an API, or hit a live endpoint that actually returns it. Add ?code=418 to this URL and the response is that status — useful for curl, interceptors, and “what does my client do on 503?” Nothing here phones home except the Try it fetch to this same page.

Which class?

101

Switching Protocols

Informational · RFC 9110

The server is switching protocols as requested by Upgrade, typically to WebSocket.

When to use

WebSocket and other protocol upgrades. The HTTP library handles this, not your route handler.

Don’t

Do not return 101 to mean “we changed something.” It is a hop-by-hop protocol switch.

Live URL

curl -i https://corecoding.com/utilities/http-status.php?code=101


    

Code use cases