Codici di stato HTTP
Che cosa significa il numero, e quando inviarlo.
Gli esempi sostituiscono temporaneamente i dati e le impostazioni. Puoi ripristinare il lavoro precedente.
0 caratteri
- codici
- 38
Risultato
1xx informazione: la richiesta è arrivata e il lavoro continua
2xx successo: ha funzionato
3xx reindirizzamento: guardare altrove
4xx la richiesta è sbagliata: di solito il client può correggerla
5xx il server ha un problema: il client può solo riprovare
100 Continue (Continua)
Carry on sending the body; the headers were acceptable.
101 Switching Protocols (Cambio di protocollo)
Agreed — usually the handshake into a WebSocket.
200 OK
It worked, and the body is the answer.
201 Created (Creato)
It worked and something new exists; Location says where.
202 Accepted (Accettato)
Taken in, not done yet. Nothing promises it will succeed.
204 No Content (Nessun contenuto)
It worked and there is deliberately nothing to send back.
206 Partial Content (Contenuto parziale)
Here is the range you asked for — how video seeking works.
301 Moved Permanently (Spostato definitivamente)
Use the new address from now on; search engines move their index.
302 Found (Trovato, altrove per ora)
Temporarily elsewhere. Keep using this address.
303 See Other (Vedi altro indirizzo)
Done — now GET that other address. The answer to a form POST.
304 Not Modified (Non modificato)
Your copy is current; nothing is sent. The point of caching.
307 Temporary Redirect (Reindirizzamento temporaneo)
Like 302 but the method must not change.
308 Permanent Redirect (Reindirizzamento permanente)
Like 301 but the method must not change.
400 Bad Request (Richiesta non valida)
The request itself is malformed. Not the same as invalid data.
401 Unauthorized (Non autenticato)
Not authenticated. Misnamed: it means “who are you?”.
402 Payment Required (Pagamento richiesto)
Reserved for years, now used by some APIs for quota and billing.
403 Forbidden (Vietato)
Authenticated and still not allowed. “I know who you are; no.”
404 Not Found (Non trovato)
Nothing here, and nothing said about whether there ever was.
405 Method Not Allowed (Metodo non consentito)
The address exists; that verb does not work on it.
406 Not Acceptable (Non accettabile)
Nothing can be produced that matches the Accept header.
408 Request Timeout (Tempo scaduto per la richiesta)
The client took too long to send it.
409 Conflict (Conflitto)
It clashes with the current state — an edit against a stale version.
410 Gone (Rimosso)
It was here and is deliberately gone. Stronger than 404.
413 Payload Too Large (Richiesta troppo grande)
The body is bigger than the server will take.
415 Unsupported Media Type (Tipo di media non supportato)
The Content-Type is not one this endpoint reads.
418 I'm a teapot (Sono una teiera)
A 1998 April Fools joke, in the standard, still implemented for fun.
422 Unprocessable Content (Contenuto non elaborabile)
Well formed, but the data fails validation. The one people want when they reach for 400.
425 Too Early (Troppo presto)
Refusing a replayable request sent in TLS early data.
428 Precondition Required (Precondizione richiesta)
Send an If-Match so you do not overwrite somebody blindly.
429 Too Many Requests (Troppe richieste)
Rate limited. Retry-After says how long to wait.
431 Request Header Fields Too Large (Intestazioni troppo grandi)
Usually one enormous cookie.
451 Unavailable For Legal Reasons (Non disponibile per motivi legali)
Blocked by law. The number is a Fahrenheit 451 joke.
500 Internal Server Error (Errore interno del server)
Something threw. The catch-all, and a sign nothing more specific was chosen.
501 Not Implemented (Non implementato)
The server does not support that method at all.
502 Bad Gateway (Gateway non valido)
A proxy got nonsense from upstream. Usually the app behind it is down.
503 Service Unavailable (Servizio non disponibile)
Temporarily down or overloaded; Retry-After may say when.
504 Gateway Timeout (Tempo scaduto del gateway)
A proxy waited for upstream and gave up.
507 Insufficient Storage (Spazio insufficiente)
No room to hold what was sent.I tuoi file restano sul tuo dispositivo
Questo strumento viene eseguito interamente nel tuo browser. Ciò che incolli viene elaborato sul tuo dispositivo e non viene mai inviato a un server, quindi puoi usarlo in sicurezza con token, chiavi e testi non pubblicati.
Esempio
Esempio pratico — Codici di stato HTTP
Inserisci le righe in ordine e usa le impostazioni seguenti. Confronta il risultato con le righe di uscita.
| Voce | Valore |
|---|---|
| Ingresso 1 | 404 |
| Uscita 1 | 404 Not Found (Non trovato) |
| Uscita 2 | Nothing here, and nothing said about whether there ever was. |
| Uscita 3 | 410 Gone (Rimosso) |
| Uscita 4 | It was here and is deliberately gone. Stronger than 404. |
404 significa Not Found. Può apparire anche 410 perché la sua spiegazione cita 404. Non viene richiesta alcuna URL.
Come funziona
- Lascia il riquadro vuoto per l’elenco intero, raggruppato per classe.
- Scrivi un numero per un singolo codice.
- Scrivi 4xx per un’intera classe.
- Scrivi una parola come «cache» o «reindirizzamento» per trovare quello che cerchi.
Domande frequenti
- Qual è la differenza tra 401 e 403?
- 401 significa «non so chi sei»: autenticati e riprova. 403 significa «so chi sei, e no». Il 401 è chiamato male: si chiama Unauthorized e vuol dire non autenticato, ed è per questo che viene confuso di continuo.
- Devo usare 400 o 422?
- 400 è per una richiesta malformata: JSON rotto, un’intestazione mancante. 422 è per una richiesta che si è analizzata benissimo e il cui contenuto non supera la validazione, che è ciò che quasi tutti intendono quando ricorrono al 400.
- Che cos’è il 418?
- Uno scherzo del primo aprile del 1998 che sta in un RFC vero, è ancora implementato e periodicamente è oggetto di una proposta seria di rimozione. Significa che il server è una teiera.
- Quale reindirizzamento devo usare?
- 301 se l’indirizzo è cambiato per sempre e vuoi che i motori spostino l’indice; 302 se è temporaneo. Se il metodo non deve passare da POST a GET, usa 308 e 307: è tutta lì la differenza.
- Viene inviato qualcosa a un server?
- No. Gira nel browser: quello che scrivi resta sul tuo computer.
Strumenti correlati
∿ Tipi MIME Che cosa mettere in Content-Type, e che cosa succede quando è sbagliato. ☐ Analizzatore di User-Agent Oltre le bugie di compatibilità, fino a che cos’è davvero. ⛓ Analizzatore di stringa di query I parametri di un URL, uno per riga. ♭ Decodificatore JWT Incolla un JSON Web Token e leggi intestazione e claim. Il token non lascia il browser.