- an application layer protocol in the internet protocol suite
- foundation of data communication for the web
- encrypted extension: https, s for secure
Client/server model
Request
A message sent from client -> server.
Syntax
- A request line
method URL protocol_version
- e.g.
GET /images/logo.png HTTP/1.1
- e.g.
-
Header fields “
Methods include
- GET
- HEAD
- POST
Response
A message sent from server -> client in response
Syntax
- A status line
protocol_version status_code reason_phrase
- e.g.
HTTP/1.1 200 OK
- e.g.
- 0 or more response header fields
status codes
1XX
(informational)
The request was received, continuing process.
2XX
(successful)
The request was successfully received, understood, and accepted.
3XX
(redirection)
Further action needs to be taken in order to complete the request.
4XX
(client error)
The request contains bad syntax or cannot be fulfilled.
5XX
(server error)
The server failed to fulfill an apparently valid request.