FastAPI ASGI üzerinde çalışır, bu yüzden bir request asenkron bir pipeline'dan geçer: ASGI sunucusu onu kabul eder, middleware onu sarar, router bir path eşleştirir, dependencies çözülür, path operation'ınız çalışır ve dönen değer response'a serialize edilir.
Aşamalar
uvicorn (ASGI server)
│ scope + receive/send
▼
ASGI / Starlette middleware ── (CORS, GZip, custom)
▼
Routing ── method + path eşleştir → path operation
▼
Dependencies (Depends) ── sub-deps, security, -setup çöz
▼
Path operation function ── handlea serialize et
▼
Background tasks ── response gönderildikten sonra çalışır
▼
Response ──▶ client
