You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tried this in a few different ways. Here's one implementation and I keep getting the same error. Any suggestions? The same thing seems to work with the bl library, so I'm not sure what's the difference here.
'use strict'
let http = require('http')
let concat = require('concat-stream')
http.get(process.argv[2], (res) => {
var result
res.pipe(concat(function (data) {
result = data.toString()
console.log(result)
}))
res.on('end', console.log(result))
res.on('error', console.log('thowing an err'))
})
I'm guessing a 'throw new TypeError('listener must be a function');' error.
The text was updated successfully, but these errors were encountered:
I've tried this in a few different ways. Here's one implementation and I keep getting the same error. Any suggestions? The same thing seems to work with the bl library, so I'm not sure what's the difference here.
I'm guessing a 'throw new TypeError('listener must be a function');' error.
The text was updated successfully, but these errors were encountered: