e.g:
res.send(200, true); //this will write true to response body
I just checked the source and found that
response.js, line 204:
if (body) {
var ret = this.format(body, _cb);
...
Against "res.send(200, false)", body is false, so there is no data to write back.
Hi @lightma,
Try to put the boolean into JSON object, so it will look like this:
res.send(200, {"result": false})
Great answer! thanks
Most helpful comment
Hi @lightma,
Try to put the boolean into JSON object, so it will look like this: