Status codes & responses

What REST actually means

So far your handlers just wrote text back. A REST API is a discipline for shaping those handlers: you expose resources (walkers, bookings) and act on them with HTTP verbs.

  • GET /walkers β€” read the list of walkers
  • POST /bookings β€” create a booking
  • GET /bookings/42 β€” read booking 42
  • DELETE /bookings/42 β€” cancel it

The verb says what to do; the path names the thing. The PawWalk iOS app you built spoke exactly this language β€” every screen was a GET or a POST to a path like these.