Http Code

101

Switching Protocols

The server understands the request and it is ready to accept and serve it, but it wants the client to change protocols, assuming doing so is advantageous. Some reasons maybe security, performance and protocol-limitations.

Use Case

The client sends an HTTP request and the server agrees to comply with the request, but it sends back a response with status 101 and an `Upgrade: 'HTTPS'`. The client will now send the request using the HTTPS protocol instead. Here, the payload of the request remains the same.