Status codes — HTTP and REST · Foundations

A status code is the first thing a client reads and often the only thing it acts on. Replace a crash with a 400, tell a bad request from a conflict, refuse a method with the methods that work, and move a path without breaking its clients.

What you will learn

Read the theory for Status codes

All HTTP and REST lessons

All Foundations courses

loading types…

What you'll learn

  • Read a status code by its class: 2xx success, 3xx go elsewhere, 4xx the client's mistake, 5xx the server's
  • Choose between 400, 404, 405, 409 and 422 by what went wrong
  • Redirect permanently with 308 and a Location, keeping the method, and answer 405 with an Allow header