📡 ToastRFC
Practice

model 5 cards

You send `GET /report`. What do you get back — the resource or something else?
A representation of the resource: a specific serialization of its state, plus metadata (Content-Type, ETag, …). One resource can have many representations. representation
Name the three intermediary roles and the key difference.
Proxy (client chose it, knows it's forwarding), gateway/reverse-proxy (acts as origin to the client, which can't tell), tunnel (blindly relays bytes, e.g. CONNECT). intermediary
What does `If-None-Match: "abc"` ask the server to do?
Send the body only if the current ETag is NOT "abc"; otherwise return 304 Not Modified. It's cache revalidation. conditional request
What does `If-Match` protect against?
The lost update: apply my PUT/DELETE only if the resource hasn't changed since I read it, else 412 Precondition Failed. conditional request
Proactive vs reactive content negotiation?
Proactive/server-driven: client sends Accept* headers with q-values, server picks. Reactive/agent-driven: server returns 300 with a list, client picks (rare). content negotiation

Click a card to reveal the answer.