Lesson 9.3

Cookies and redirects on the Response

Make DD-08 concrete with the res._cookies list, add res.cookie/clearCookie, learn the 3xx family and res.redirect, and turn stage 13 green with the login flow.

35 minsrc/response.js, examples/demo.js
  • Store cookies as a list and emit one set-cookie line per element in _send.
  • Add res.cookie and res.clearCookie as chainable methods over the list.
  • Send a redirect as a 3xx status plus a Location header with res.redirect.
Locked

This chapter is part of the framework capstone. Chapters 1 and 2 are free to build - unlock the rest to keep going.

Unlock the depth