Hypertext Transfer Protocol (HTTP)
- is an application-layer/network-level API protocol for transmitting hypermedia documents (e.g. HTML, JavaScript, CSS, etc)
- it was designed for communication between web clients and web servers
- HTTP follows a classical client-server model, with a client opening a connection to make a request, then waiting until it receives a response
- HTTP is a stateless protocol, meaning that this protocol does not have builtin “sessions”
HTTP - History
- HTTP is the underlying communication protocol of the World Wide Web
- It was invented by Tim Berners-Lee at CERN between 1989 and 1991, and open-sourced in 1993
HTTP - Request & Response
|
HTTP Request |
HTTP Response | |
|---|---|---|
|
Template |
Request-Method /Request-Resource HTTP-Version HTTP Request Body (depends on Request-Method) |
HTTP-Version HTTP Response CodeHTTP Headers HTTP Response Body |
|
Example |
POST /test/resource HTTP/1.1 |
HTTP/1.1 200 OK <html><header></header><body><p>Hello, World</p></body></html> |
|
Other |