I tried debugging/logging the response parameter in the function below but it doesn't contain the actual body.
function (request, response, route, error) {}
Above function was taken from restify documentation. Link below: http://mcavage.me/node-restify/#Server-API
Here's my code:
server.on('after', function(req, resp, route, error) {
console.log(resp);
});
Thanks in advance!
Read https://github.com/mcavage/node-restify/blob/master/lib/response.js
On line 201, you can see that the real body sent is under resp._data