The code block below shows that showLog in client.js buffers the response received when we hit the log endpoint (from line 191 of client.js):
api.get(logUrl, function(err, req, res, result) {
if (err) return callback(err);
callback(null, res.body); // This is weird that result is empty and res.body isn't
});
By comparison, a simple curl localhost:8888/log returns an immediate, streaming response. The showLog method should do the same.
This could be the beginning of a larger refactor away from restify, since we have to drop down to its ugly HttpClient, at which point I'd rather just use request or even http.request.
The code block below shows that showLog in client.js buffers the response received when we hit the log endpoint (from line 191 of client.js):
By comparison, a simple
curl localhost:8888/logreturns an immediate, streaming response. The showLog method should do the same.This could be the beginning of a larger refactor away from restify, since we have to drop down to its ugly HttpClient, at which point I'd rather just use request or even http.request.