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

Option to wait for the end of the request #8

Open
nt1m opened this issue Jun 5, 2017 · 1 comment
Open

Option to wait for the end of the request #8

nt1m opened this issue Jun 5, 2017 · 1 comment

Comments

@nt1m
Copy link
Member

nt1m commented Jun 5, 2017

Simplify:

request.on('data', chunk => {
  json += String(chunk);
});
request.on('end', () => {

by introducing an option.

@jankeromnes
Copy link
Member

Great idea! I agree that we should find a sensible way to refactor this request-reading boilerplate.

I'm not sure whether it's better to address this in Self API directly, or in the code using it (e.g. Janitor).

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

No branches or pull requests

2 participants