Nouplo

Códigos de estado HTTP

Qué significa el número y cuándo enviarlo.

Los ejemplos sustituyen temporalmente la entrada y los ajustes. Puedes recuperar tu trabajo anterior.

0 caracteres
códigos
38
Resultado
1xx  información: la petición llegó y el trabajo sigue
2xx  éxito: ha funcionado
3xx  redirección: mirar en otro sitio
4xx  la petición está mal: el cliente suele poder arreglarla
5xx  el servidor falla: el cliente solo puede reintentar

100  Continue (Continuar)
     Carry on sending the body; the headers were acceptable.
101  Switching Protocols (Cambio de protocolo)
     Agreed — usually the handshake into a WebSocket.
200  OK
     It worked, and the body is the answer.
201  Created (Creado)
     It worked and something new exists; Location says where.
202  Accepted (Aceptado)
     Taken in, not done yet. Nothing promises it will succeed.
204  No Content (Sin contenido)
     It worked and there is deliberately nothing to send back.
206  Partial Content (Contenido parcial)
     Here is the range you asked for — how video seeking works.
301  Moved Permanently (Movido permanentemente)
     Use the new address from now on; search engines move their index.
302  Found (Encontrado, en otro sitio por ahora)
     Temporarily elsewhere. Keep using this address.
303  See Other (Ver otra dirección)
     Done — now GET that other address. The answer to a form POST.
304  Not Modified (No modificado)
     Your copy is current; nothing is sent. The point of caching.
307  Temporary Redirect (Redirección temporal)
     Like 302 but the method must not change.
308  Permanent Redirect (Redirección permanente)
     Like 301 but the method must not change.
400  Bad Request (Petición incorrecta)
     The request itself is malformed. Not the same as invalid data.
401  Unauthorized (No autenticado)
     Not authenticated. Misnamed: it means “who are you?”.
402  Payment Required (Pago requerido)
     Reserved for years, now used by some APIs for quota and billing.
403  Forbidden (Prohibido)
     Authenticated and still not allowed. “I know who you are; no.”
404  Not Found (No encontrado)
     Nothing here, and nothing said about whether there ever was.
405  Method Not Allowed (Método no permitido)
     The address exists; that verb does not work on it.
406  Not Acceptable (No aceptable)
     Nothing can be produced that matches the Accept header.
408  Request Timeout (Tiempo de espera de la petición agotado)
     The client took too long to send it.
409  Conflict (Conflicto)
     It clashes with the current state — an edit against a stale version.
410  Gone (Eliminado)
     It was here and is deliberately gone. Stronger than 404.
413  Payload Too Large (Petición demasiado grande)
     The body is bigger than the server will take.
415  Unsupported Media Type (Tipo de medio no admitido)
     The Content-Type is not one this endpoint reads.
418  I'm a teapot (Soy una tetera)
     A 1998 April Fools joke, in the standard, still implemented for fun.
422  Unprocessable Content (Contenido no procesable)
     Well formed, but the data fails validation. The one people want when they reach for 400.
425  Too Early (Demasiado pronto)
     Refusing a replayable request sent in TLS early data.
428  Precondition Required (Se requiere una condición previa)
     Send an If-Match so you do not overwrite somebody blindly.
429  Too Many Requests (Demasiadas peticiones)
     Rate limited. Retry-After says how long to wait.
431  Request Header Fields Too Large (Cabeceras demasiado grandes)
     Usually one enormous cookie.
451  Unavailable For Legal Reasons (No disponible por motivos legales)
     Blocked by law. The number is a Fahrenheit 451 joke.
500  Internal Server Error (Error interno del servidor)
     Something threw. The catch-all, and a sign nothing more specific was chosen.
501  Not Implemented (No implementado)
     The server does not support that method at all.
502  Bad Gateway (Puerta de enlace incorrecta)
     A proxy got nonsense from upstream. Usually the app behind it is down.
503  Service Unavailable (Servicio no disponible)
     Temporarily down or overloaded; Retry-After may say when.
504  Gateway Timeout (Tiempo de espera de la puerta de enlace agotado)
     A proxy waited for upstream and gave up.
507  Insufficient Storage (Almacenamiento insuficiente)
     No room to hold what was sent.

Tus archivos se quedan en tu dispositivo

Esta herramienta se ejecuta por completo en tu navegador. Lo que pegas se procesa en tu dispositivo y nunca se envía a un servidor, así que puedes usarla con tokens, claves y textos sin publicar.

Ejemplo

Ejemplo práctico — Códigos de estado HTTP

Introduce las líneas en orden y usa los ajustes indicados. Compara el resultado con las líneas de salida.

Elemento Valor
Entrada 1 404
Salida 1 404 Not Found (No encontrado)
Salida 2 Nothing here, and nothing said about whether there ever was.
Salida 3 410 Gone (Eliminado)
Salida 4 It was here and is deliberately gone. Stronger than 404.

404 significa Not Found. También puede aparecer 410 porque su explicación lo compara con 404. No se consulta ninguna URL.

Cómo funciona

  1. Deja el cuadro vacío para la lista entera, agrupada por clases.
  2. Escribe un número para un código concreto.
  3. Escribe 4xx para toda una clase.
  4. Escribe una palabra como «caché» o «redirección» para encontrar el que buscas.

Preguntas frecuentes

¿Cuál es la diferencia entre 401 y 403?
401 significa «no sé quién eres»: autentícate y vuelve a intentarlo. 403 significa «sé quién eres, y no». El 401 está mal nombrado: se llama Unauthorized y quiere decir no autenticado, y por eso se confunde constantemente.
¿Debo usar 400 o 422?
400 es para una petición mal formada: JSON roto, una cabecera que falta. 422 es para una petición que se analizó bien y cuyo contenido no pasa la validación, que es lo que la mayoría quiere decir cuando echa mano del 400.
¿Qué es el 418?
Una broma del Día de los Inocentes de 1998 que está en un RFC de verdad, se sigue implementando y cada tanto es objeto de una propuesta seria para eliminarlo. Significa que el servidor es una tetera.
¿Qué redirección debo usar?
301 si la dirección ha cambiado para siempre y quieres que los buscadores muevan su índice; 302 si es temporal. Si el método no debe pasar de POST a GET, usa 308 y 307: esa es toda la diferencia.
¿Se envía algo a un servidor?
No. Funciona en tu navegador, así que lo que escribas se queda en tu ordenador.

Herramientas relacionadas