Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

showLog should stream response #11

Open
gsf opened this issue Nov 19, 2013 · 0 comments
Open

showLog should stream response #11

gsf opened this issue Nov 19, 2013 · 0 comments

Comments

@gsf
Copy link
Contributor

gsf commented Nov 19, 2013

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant