-
-
Notifications
You must be signed in to change notification settings - Fork 957
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
empty response from requestb.in #213
Comments
@pahud [it is recommended](node js readable stream to string) to listen on 'use strict';
const got = require('got')
const url = 'http://requestb.in/1234gpr1'
got.stream( url )
.on('response', resp=>resp.on('data', chunk => console.log(chunk) ))
// or
// got.stream( url ).on('data', chunk => console.log(chunk)); |
@floatdrop
|
@floatdrop
but still not work. let body = '';
res.on('data', data => {
body += data.toString();
})
.on('end', () => {
console.log(body);
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I am having problem getting response from requestb.in with got.stream, did I miss anything?
The text was updated successfully, but these errors were encountered: