Every handler receives one object. It carries the request, parsed input, session state, and the helpers that produce a response.
params, query, body
Route parameters, parsed query string, parsed request body.
render(view, data, status)
Compile a Noderframe view and send HTML.
json(data, status)
Send JSON—or a readable viewer when a browser asks for HTML.
text(value, status, type)
Send plain text or a custom content type.
abort(status, message)
Throw an HttpError handled by the error pages.
session
Signed, stateless session store. Mutating it re-issues the cookie.
validate(rules)
Validate the body and return { valid, values, errors }.
service(name)
Resolve a service registered with app.provide().
csrfToken, nonce, ip, cookies
Per-request values for forms, inline scripts, limiting, and cookies.
setCookie / clearCookie
Queue cookies onto the response.