Skip to content

showLog should stream response #11

@gsf

Description

@gsf

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions