Set response header.
The header field.
The header value.
res.header("Content-Type", "application/json");
res.header("Content-Type", "text/html");
res.header("Content-Type", "text/plain");
res.header("Content-Type", "text/plain").status(200);
Redirect to path.
The redirect path.
res.redirect("/path/to/redirect");
res.redirect("/path/to/redirect").status(200);
res.redirect("/path/to/redirect").json({ message: "OK" });
res.redirect("/path/to/redirect").json({ message: "OK" }).status(200);
Generated using TypeDoc
Response - The response object.