Códigos de Status HTTP e Tipos MIME

Referência pesquisável de códigos de status HTTP (o que realmente significam) mais busca de extensão → tipo MIME.

encoding

Códigos de status HTTP e tipos MIME

  • 100

    Continue

    Request headers accepted — client may send the body.

  • 101

    Switching Protocols

    Server agrees to switch protocol (e.g. HTTP → WebSocket upgrade).

  • 102

    Processing

    WebDAV: request received, still working — prevents client timeout.

  • 103

    Early Hints

    Preload hints sent before the final response, so browsers fetch assets sooner.

  • 200

    OK

    Standard success — the response body carries the result.

  • 201

    Created

    Resource created; Location header usually points to it.

  • 202

    Accepted

    Request queued for async processing — no promise it will finish.

  • 204

    No Content

    Success with an intentionally empty body (common for DELETE/PUT).

  • 206

    Partial Content

    Byte-range response — used by video streaming and resumable downloads.

  • 301

    Moved Permanently

    Permanent redirect; browsers and search engines update their references.

  • 302

    Found

    Temporary redirect; method may change to GET on follow.

  • 304

    Not Modified

    Cached copy is still valid — sent for conditional requests (ETag / If-Modified-Since).

  • 307

    Temporary Redirect

    Like 302 but the method and body must not change.

  • 308

    Permanent Redirect

    Like 301 but the method and body must not change.

  • 400

    Bad Request

    Malformed request — syntax, framing, or invalid parameters.

  • 401

    Unauthorized

    Authentication missing or invalid — really means "unauthenticated".

  • 403

    Forbidden

    Authenticated but not allowed — credentials won’t help.

  • 404

    Not Found

    No resource at this URL (or the server hides its existence).

  • 405

    Method Not Allowed

    URL exists but not for this HTTP method — check the Allow header.

  • 406

    Not Acceptable

    Server cannot produce a representation matching the Accept headers.

  • 408

    Request Timeout

    Client took too long to send the full request.

  • 409

    Conflict

    Request clashes with current resource state (e.g. concurrent edit).

  • 410

    Gone

    Deliberately removed, permanently — stronger signal than 404.

  • 411

    Length Required

    Server insists on a Content-Length header.

  • 412

    Precondition Failed

    An If-* conditional header did not match (optimistic locking).

  • 413

    Content Too Large

    Request body exceeds the server’s size limit.

  • 415

    Unsupported Media Type

    Body format not supported (wrong Content-Type).

  • 418

    I'm a teapot

    April-fools RFC 2324; some APIs use it for playful blocks.

  • 422

    Unprocessable Content

    Syntax is fine but the data fails validation rules.

  • 425

    Too Early

    Server refuses to risk a replayed request (TLS early data).

  • 429

    Too Many Requests

    Rate limit hit — Retry-After tells you when to try again.

  • 431

    Request Header Fields Too Large

    Headers (often cookies) exceed the server limit.

  • 451

    Unavailable For Legal Reasons

    Blocked for legal/censorship reasons.

  • 500

    Internal Server Error

    Unhandled server-side failure — the catch-all 5xx.

  • 501

    Not Implemented

    Server does not support this method at all.

  • 502

    Bad Gateway

    Proxy/load balancer got an invalid response from the upstream server.

  • 503

    Service Unavailable

    Temporarily overloaded or down for maintenance — retry later.

  • 504

    Gateway Timeout

    Proxy gave up waiting for the upstream server.

  • 505

    HTTP Version Not Supported

    Requested HTTP version is not supported.

  • 507

    Insufficient Storage

    WebDAV: server cannot store what the request requires.

  • 508

    Loop Detected

    WebDAV: infinite loop while processing the request.

Roda totalmente no seu navegador. Seus dados nunca saem do seu dispositivo.

What next?

FAQ

O que é essa página?

Uma referência pesquisável de códigos de status HTTP e tipos MIME comuns. Pesquise por número, por nome ou filtre por classe — 1xx informacional, 2xx sucesso, 3xx redirecionamento, 4xx erro do cliente, 5xx erro do servidor.

Como faço para ler o primeiro dígito?

Ele tells you who to talk to. Um 4xx diz que o pedido estava errado — conserte o chamador. Um 5xx diz que o servidor falhou enquanto lidava com um pedido válido — conserte o servidor. Acertar esse limite é a maior parte do valor no esquema, e é por isso que retornar 200 com um corpo de erro torna sistemas difíceis de operar: cada monitor e cache a jusante agora acredita que a chamada succeeded.

Qual é a diferença entre 301 e 302?

301 é permanente e 302 é temporário. Navegadores e mecanismos de busca armazenam agressivamente um 301 — geralmente indefinidamente — portanto um 301 emitido por engano é genuinamente difícil de desfazer, porque os clientes param de perguntar a URL antiga. Use 302 (ou 307) enquanto você está inseguro.

E quanto a 307 e 308?

São as versões rígidas de 302 e 301. Os códigos mais antigos permitiam que os clientes mudassem um POST para um GET ao seguir o redirecionamento; 307 e 308 proíbem isso, preservando o método e o corpo. Se você está redirecionando qualquer coisa que não seja um GET, prefira-os.

Quando devo usar 401 versus 403?

401 significa "não autenticado" — você não provou quem é, e um cabeçalho WWW-Authenticate deve acompanhá-lo. 403 significa "autenticado, mas não permitido". Um vazamento comum é retornar 403 onde 404 seria melhor: informar a um usuário não autorizado que um recurso existe é informação em si.

Para o que é 304 Not Modified?

Pedidos condicionais. O cliente envia um validador como If-None-Match, e se nada mudou o servidor responde 304 sem corpo — salvando a transferência enquanto confirma que a cópia em cache ainda é boa.

418 é real?

É um código genuinamente registrado de uma RFC do Dia da Mentira — "Sou uma chaleira" — e periodicamente é proposto para remoção. Não o use em produção; ele aparece na lista por completude.

Por que preciso de tipos MIME ao lado de códigos de status?

Porque ambos fazem parte de acertar uma resposta corretamente. Um status correto com text/plain em JSON deixa os clientes adivinhando, e os navegadores podem farejar o conteúdo e se comportar de formas que você não pretendia.

Algo é enviado para um servidor?

Não. A lista é empacotada com a página e pesquisada localmente.

More encoding tools