• ↑↓ pour naviguer
  • pour ouvrir
  • pour sélectionner
  • ⌘ ⌥ ↵ pour ouvrir dans un panneau
  • ←→ pour naviguer
  • esc pour rejeter
⌘ '
raccourcis clavier

The Problem

What actually happens between fetch() and response.json()?

Formal Definition

Per Wikipedia: “The request-response cycle is the full round trip — DNS, TCP, TLS, HTTP request, server handler, HTTP response, browser parse.”

Explanation

Like ordering food — find restaurant address, travel there, place order, wait for kitchen, carry tray back.

How It Works

  1. Resolve host via DNS
  2. Open TCP then TLS
  3. Send HTTP request line+headers+body
  4. Server routes and handles
  5. Return status+headers+body

Visual Explanation

http_request_response_cycle A Client B Network A->B step 1 C Server B->C step 2

Semantic Network

semantic_http_request_response_cycle THIS HTTP Request Response Cycle REL1 Related THIS--REL1 related REL2 Prereq THIS--REL2 builds from

Key Properties

  • Stateless per request
  • Keep-Alive reuses TCP
  • 3 RTT before first byte with TLS

Real-World Example

curl -v https://api.example.com

Connections

  • Built from: HTTP — cycle implements HTTP
  • Built from: HTTP Headers — headers travel in cycle
  • Related: HTTP Status Codes — status returned
  • Builds into: CORS — CORS checked in cycle

Edge Cases & Gotchas

  • Assuming one TCP per request — keep-alive reuses
  • Forgetting preflight in cycle