API Fundamentals
/Advanced
1xx Informational
Definition
HTTP status codes ranging from 100-199. They indicate that the request was received and the process is continuing. They are purely informational and rarely interacted with directly by standard frontend developers.
Explain Like I'm New
The server saying: 'Hold on, I heard you, I'm working on it, please wait.'
Real World Example
`101 Switching Protocols`: A client asks the server to upgrade a standard HTTP connection into a persistent WebSocket connection. The server replies with 101 to say 'Okay, we are now speaking WebSockets.'
Common Use Cases
- •WebSockets
- •Protocol upgrades
Terminal Output
bash / terminal
/*
Conceptual Flow of a 101 Switching Protocols (WebSocket Upgrade)
1. Client sends request to connect:
GET /chat HTTP/1.1
Upgrade: websocket
Connection: Upgrade
2. Server accepts the upgrade:
HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
3. The HTTP connection is kept permanently open and binary data begins flowing.
*/
Interview Questions
basic
- Do you frequently write code to handle 1xx status codes in standard React applications?
intermediate
- What does the `100 Continue` status code tell the client?