send
send: (
options?) =>Function
Defined in: http/send.js:114
Creates a response serialization function.
Parameters
Section titled “Parameters”options?
Section titled “options?”Send configuration
envelope?
Section titled “envelope?”boolean | Function = false
Wrap 2xx Object bodies in a response
envelope. false (default) — no envelope. true — built-in format {id, status, data, count?}. function(body, ctx) — custom envelope.
boolean = true
Generate and evaluate ETags for conditional responses
prefer?
Section titled “prefer?”boolean = false
When true, read domainAcc.prefer for RFC 7240
handling. Adds Prefer to the Vary header.
prettify?
Section titled “prettify?”boolean = false
Pretty-print JSON output
string[] = ...
Vary header values to append
Returns
Section titled “Returns”Function
(req, res, responseAcc, domainAcc) => void