← Back to TypeScript
HTTP and Networking
Status classes, URL anatomy, idempotency, and a retry that backs off — the wire-level facts every system design answer quietly assumes you know cold.
Status code classes
intermediateblankComplete the classifier that maps any HTTP status to its class — the four boundaries every interview assumes you know.
Challenge: take a URL apart by hand
intermediatechallengeParse scheme, host, port, path and query parameters out of a URL string without the URL class.
Challenge: a retry that backs off
intermediatechallengeWrap a flaky request in exponential backoff — injected sleep, doubling delays, and the original error when you give up.
Review: the retry that quits one attempt early
intermediatereviewA retry wrapper documents retries as attempts after the first — and implements one attempt fewer. It also buries the real error. Find both symptoms, one root cause.
Idempotent and safe methods
intermediateblankComplete the table of HTTP method semantics — which repeats are free, and which never change anything.