Modified: July 19 2024

Link to video.


Request/Response Cycle

It’s like a conversation. Client and server advertise capabilities and supported formats to one another.

HTTP is stateless, but the implementation will do state like things like caching. You need to see both sides of the conversation.

Anatomy of a request

GET / HTTP/1.1
Host: localhost:8001

Request body.

Anatomy of a response

HTTP/1.0 200 OK
X-Headers: Here

Response body.

Request headers

Sent automatically…when not doing Ajax

When sending img, css, or script requests, Cookies are sent.