HTTP Request & Response
Richiesta e risposta HTTP
Una richiesta HTTP è ciò che un client invia a un server. Ha un metodo, un indirizzo, delle intestazioni e, a volte, un corpo. La risposta restituisce uno stato, delle intestazioni e dei dati.
Un altro esempio
Un modulo invia JSON. Una risposta 422 dà errori sui campi, mentre una risposta 201 dà il nuovo record.
Parti principali
- 01Originating request
- 02Resolution or processing hop
- 03Response, timing, and failure
Usalo quando
Usa codici di stato chiari e corpi strutturati in modo che successo e fallimento seguano regole note.
Non usarlo quando
Non considerare mai ogni risposta come un successo o inserire dettagli sensibili in un errore.
Nome usato nel codice
fetch() / HTTP status Prima di spedire
Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback.
Outcome: Complete the task with Richiesta e risposta HTTP (HTTP Request & Response). User context: Un modulo invia JSON. Una risposta 422 dà errori sui campi, mentre una risposta 201 dà il nuovo record. Technical concept or control: Richiesta e risposta HTTP (HTTP Request & Response). Why it fits: Usa codici di stato chiari e corpi strutturati in modo che successo e fallimento seguano regole note. Do not use it when: Non considerare mai ogni risposta come un successo o inserire dettagli sensibili in un errore. Engineering requirements: Define inputs, outputs, contracts, and rules that must always hold. Set authorization and input checks. Define failures, timeouts, retries, one-time effects, data moves, and compatibility limits. Operations: Add useful signals and logs that hide sensitive data. Set capacity limits and write an operator guide. Test recovery and rollback. Acceptance criteria: Contract and failure-path tests pass. Data and authorization rules still hold during retries and partial failures. Check performance limits, monitoring, recovery, and rollback. Evidence and limits (evidence boundary): Lo standard copre solo l'ambito elencato. Non sceglie lo stile visivo, la decisione sul prodotto o l'esempio di vocabolario. Unknowns to confirm: Where the code runs, data stores, traffic shape, consistency needs, and the security boundary. Also confirm the compatibility period, service goals, and rollback limits.
Controlla questa richiesta
Review how Richiesta e risposta HTTP (HTTP Request & Response) is used now. Definition: Una richiesta HTTP è ciò che un client invia a un server. Ha un metodo, un indirizzo, delle intestazioni e, a volte, un corpo. La risposta restituisce uno stato, delle intestazioni e dei dati. Release checks: Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.