Skip to main content
62 codici trovati
1xxInformationalLa richiesta è stata ricevuta, il processo continua
2xxSuccessLa richiesta è stata ricevuta, compresa e accettata con successo
3xxRedirectionSono necessarie ulteriori azioni per completare la richiesta
4xxClient ErrorLa richiesta contiene una sintassi errata o non può essere soddisfatta
5xxServer ErrorIl server non è riuscito a soddisfare una richiesta apparentemente valida
100

Continue

Il client può continuare con la sua richiesta. Il server ha ricevuto gli header della richiesta e il client può procedere con l'invio del body.

101

Switching Protocols

Il server accetta di cambiare protocollo come richiesto dal client tramite l'header Upgrade.

102

Processing

Il server ha ricevuto e sta elaborando la richiesta, ma non ha ancora una risposta disponibile (WebDAV).

103

Early Hints

Usato per restituire alcuni header di risposta prima del messaggio HTTP finale, permettendo il precaricamento delle risorse.

200

OK

La richiesta è stata completata con successo. Il significato varia in base al metodo HTTP utilizzato.

201

Created

La richiesta è stata completata con successo e una nuova risorsa è stata creata. Tipicamente usato dopo richieste POST o PUT.

202

Accepted

La richiesta è stata accettata per l'elaborazione, ma l'elaborazione non è stata completata. Utile per operazioni asincrone.

203

Non-Authoritative Information

La risposta è stata modificata da un proxy o cache e potrebbe non corrispondere alla risposta originale del server.

204

No Content

La richiesta è stata completata con successo ma non c'è contenuto da restituire. Comunemente usato per operazioni DELETE.

205

Reset Content

Il server ha completato la richiesta e richiede che il client resetti la vista del documento.

206

Partial Content

Il server sta restituendo solo parte della risorsa a causa di un header Range inviato dal client.

207

Multi-Status

Il corpo del messaggio contiene un documento XML con informazioni su più risorse (WebDAV).

208

Already Reported

I membri di un binding DAV sono già stati enumerati in una risposta precedente (WebDAV).

226

IM Used

Il server ha soddisfatto una richiesta GET per la risorsa e la risposta rappresenta il risultato di manipolazioni delta.

300

Multiple Choices

La richiesta ha più di una possibile risposta. Il client dovrebbe scegliere una delle alternative disponibili.

301

Moved Permanently

L'URL della risorsa richiesta è stato cambiato permanentemente. La nuova URL è fornita nella risposta.

302

Found

L'URL della risorsa richiesta è stato cambiato temporaneamente. Il client dovrebbe continuare a usare l'URL originale.

303

See Other

Il server indirizza il client a ottenere la risorsa richiesta da un'altra URI tramite richiesta GET.

304

Not Modified

La risorsa non è stata modificata dall'ultima richiesta. Usato per caching con If-Modified-Since o If-None-Match.

305Deprecato

Use Proxy

La risorsa richiesta deve essere accessibile tramite il proxy specificato nell'header Location.

307

Temporary Redirect

Il server indirizza il client a un'altra URI, ma il client deve usare lo stesso metodo HTTP della richiesta originale.

308

Permanent Redirect

La risorsa è stata spostata permanentemente a un'altra URI. Il client deve usare lo stesso metodo HTTP.

400

Bad Request

Il server non può elaborare la richiesta a causa di una sintassi errata o parametri non validi.

401

Unauthorized

La richiesta richiede autenticazione. Il client deve fornire credenziali valide per accedere alla risorsa.

402Sperimentale

Payment Required

Riservato per uso futuro. Originariamente destinato a sistemi di pagamento digitale.

403

Forbidden

Il server ha compreso la richiesta ma rifiuta di autorizzarla. A differenza di 401, l'autenticazione non aiuterà.

404

Not Found

Il server non riesce a trovare la risorsa richiesta. L'URL non corrisponde a nessuna risorsa esistente.

405

Method Not Allowed

Il metodo HTTP utilizzato non è supportato per la risorsa richiesta (es. DELETE su risorsa read-only).

406

Not Acceptable

Il server non può produrre una risposta che corrisponda ai criteri Accept specificati dal client.

407

Proxy Authentication Required

Il client deve prima autenticarsi con il proxy prima che la richiesta possa essere elaborata.

408

Request Timeout

Il server ha aspettato troppo a lungo per la richiesta del client e ha chiuso la connessione.

409

Conflict

La richiesta non può essere completata a causa di un conflitto con lo stato attuale della risorsa.

410

Gone

La risorsa richiesta non è più disponibile e non sarà più disponibile in futuro.

411

Length Required

Il server richiede l'header Content-Length nella richiesta ma non è stato fornito.

412

Precondition Failed

Una o più condizioni specificate negli header della richiesta non sono state soddisfatte.

413

Payload Too Large

La richiesta è più grande di quanto il server sia disposto o in grado di elaborare.

414

URI Too Long

L'URI fornito è troppo lungo per essere elaborato dal server.

415

Unsupported Media Type

Il formato del payload della richiesta non è supportato dal server.

416

Range Not Satisfiable

L'intervallo specificato nell'header Range non può essere soddisfatto.

417

Expectation Failed

Il server non può soddisfare i requisiti indicati nell'header Expect della richiesta.

418

I'm a teapot

Il server rifiuta di preparare caffè perché è una teiera. Definito come scherzo di April Fools' nel 1998.

421

Misdirected Request

La richiesta è stata diretta a un server che non è in grado di produrre una risposta.

422

Unprocessable Entity

La richiesta è ben formata ma contiene errori semantici che impediscono l'elaborazione (WebDAV).

423

Locked

La risorsa a cui si sta accedendo è bloccata (WebDAV).

424

Failed Dependency

La richiesta è fallita a causa del fallimento di una richiesta precedente (WebDAV).

425

Too Early

Il server non è disposto a rischiare di elaborare una richiesta che potrebbe essere ripetuta.

426

Upgrade Required

Il server rifiuta di elaborare la richiesta usando il protocollo corrente ma potrebbe farlo con un upgrade.

428

Precondition Required

Il server richiede che la richiesta sia condizionale per prevenire conflitti di concorrenza.

429

Too Many Requests

L'utente ha inviato troppe richieste in un determinato periodo di tempo (rate limiting).

431

Request Header Fields Too Large

Il server rifiuta di elaborare la richiesta perché gli header sono troppo grandi.

451

Unavailable For Legal Reasons

La risorsa non è disponibile per motivi legali (es. censura, ordine del tribunale).

500

Internal Server Error

Il server ha riscontrato un errore imprevisto che gli impedisce di completare la richiesta.

501

Not Implemented

Il server non supporta la funzionalità richiesta per completare la richiesta.

502

Bad Gateway

Il server, agendo come gateway o proxy, ha ricevuto una risposta non valida dal server upstream.

503

Service Unavailable

Il server non è attualmente disponibile (sovraccarico o in manutenzione). Di solito temporaneo.

504

Gateway Timeout

Il server, agendo come gateway, non ha ricevuto una risposta in tempo dal server upstream.

505

HTTP Version Not Supported

Il server non supporta la versione del protocollo HTTP utilizzata nella richiesta.

506

Variant Also Negotiates

Il server ha un errore di configurazione interna durante la negoziazione del contenuto.

507

Insufficient Storage

Il server non è in grado di memorizzare la rappresentazione necessaria per completare la richiesta (WebDAV).

508

Loop Detected

Il server ha rilevato un loop infinito durante l'elaborazione della richiesta (WebDAV).

510

Not Extended

Sono necessarie ulteriori estensioni alla richiesta affinché il server possa soddisfarla.

511

Network Authentication Required

Il client deve autenticarsi per accedere alla rete (es. captive portal Wi-Fi).

Riferimento Rapido

Codici Comuni

  • 200 OK - Richiesta riuscita
  • 201 Created - Risorsa creata (POST)
  • 204 No Content - Successo senza corpo (DELETE)
  • 301/302 - Redirect permanente/temporaneo
  • 400 Bad Request - Errore client
  • 401 Unauthorized - Autenticazione richiesta
  • 403 Forbidden - Accesso negato
  • 404 Not Found - Risorsa non trovata
  • 500 Internal Error - Errore server

Best Practices API

  • Usa 201 per POST che creano risorse
  • Usa 204 per DELETE riuscite
  • Usa 400 per validazione fallita
  • Usa 401 se manca autenticazione
  • Usa 403 se mancano permessi
  • Usa 404 se la risorsa non esiste
  • Usa 409 per conflitti di stato
  • Usa 422 per errori semantici
  • Usa 429 per rate limiting

Come utilizzare HTTP Status Explorer

Find an HTTP code for number, name or description

Use the search bar at the top of the page to filter HTTP codes. You can search for a code number (e.g. "404"), name (e.g. "Not Found"), or keywords in the description (e.g. "authentication"). Results update in real-time.

Filter by category using filter buttons

Click on category buttons to see only codes for a specific family: "1xx Informational", "2xx Success", "3xx Redirection", "4xx Client Error" or "5xx Server Error". The count next to each category shows how many codes belong to it.

Click on a code to view complete details

Click on any HTTP code card to open the details panel. Here you'll find an extended description, category, deprecated/experimental badges and a direct link to the official RFC.

Copy code into notes

Click the "Copy Code" button on the details panel to copy the code and name (e.g. "404 Not Found") into notes ready to paste in documentation or code.

Suggerimenti

  • Quick reference at the bottom of the page lists common API REST codes with best practices on when to use them, ideal for fast consultation during development.
  • Use search by partial code number: searching for "40" will show all codes in the 400 family, or searching for "redirect" will quickly find codes 301, 302, 307 and 308.
  • Codes with the "Deprecated" badge (like 305) should not be used in new implementations: check the RFC indicated to see which modern code replaces them.

Domande frequenti

What is the difference between HTTP code 401 and code 403?

Code 401 (Unauthorized) indicates that the request requires authentication: the user has not identified themselves or their credentials are incorrect. Code 403 (Forbidden) indicates that the server understood the request and knows who you are, but still denied access because you do not have the necessary permissions.

When to use HTTP 301 instead of 302 for a redirect?

Code 301 (Moved Permanently) is used when a resource has been permanently moved to a new URL; search engines will transfer the page rank to the new URL. Code 302 (Found) is for temporary redirects, where the old URL remains valid in the future and the page rank is not transferred.

What does the HTTP error code 422 Unprocessable Entity mean?

The code 422 indicates that the request is syntactically correct (not a 400 Bad Request) but contains semantic errors preventing processing. It's commonly used in REST APIs to signal validation errors on sent data, such as an invalid email field or out-of-range date.

What do I do when I receive a 429 "Too Many Requests" code?

Code 429 indicates you have exceeded the allowed request limit (rate limiting). The response typically includes a "Retry-After" header indicating how many seconds to wait before retrying. As a developer, implement an exponential backoff mechanism in your application.

What is the difference between 500, 502, 503, and 504 as server errors?

500 is a generic internal server error. 502 (Bad Gateway) and 504 (Gateway Timeout) indicate that an intermediate server (proxy, load balancer) received an invalid response or no response from the backend server. 503 (Service Unavailable) indicates that the server is temporarily overloaded or in maintenance.