In an HTTP conversation, who sends the first message?
Options
- The server, with a welcome message
- The client, with a request (Correct option)
- Both of them at the same time
- The database, with a query
Answer
The client, with a request
Why
HTTP always works as request then response.
The client (usually a browser or app) sends the request, and the server answers. A server does not normally start sending to a client by itself.
For live updates (chat, notifications) there are other mechanisms such as WebSockets.
Remember
Client asks first, server answers.