writeCookie method

void writeCookie(
  1. ResponseContext res,
  2. Cookie cookie
)

Signs a single cookie, and adds it to an outgoing response. The input cookie is not modified.

See createSignedCookie.

Implementation

void writeCookie(ResponseContext res, Cookie cookie) {
  res.cookies.add(createSignedCookie(cookie));
}