What is HTTP?
Options
- A programming language that is used for building web pages
- The protocol browsers and servers use: a request, then a response (Correct option)
- A type of database that is used for storing web data
- An antivirus program that scans the traffic of the web
Answer
The set of rules (protocol) that browsers and servers use to exchange web pages and data: a client sends a request and the server sends a response
Why
HTTP (HyperText Transfer Protocol) is the language of the web. A request has a method (like GET), a path and optional headers and body. A response has a status code (like 200 or 404), headers and usually a body.
It is a client-server protocol: the client always starts the conversation.
HTTPS is HTTP inside an encrypted connection.
Remember
HTTP = how clients and servers talk on the web.