HTTP protocol structure
Sample request:
GET /api/books/123 HTTP/1.1 ← method + path + HTTP version
Host: localhost:8080 ← header (automatically added)
Accept: application/json ← header (expected content type)
Authorization: Bearer token123 ← header (auth information)
← empty line (required)
← request body (currently missing)
Sample response:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 54
← empty line (required)
{"id": 123, "title": "Clean Code", "author": "Martin"} ← response body