Skip to content

Where to listen for events in streams? #102

Answered by floatdrop
Jakobud asked this question in Q&A
Discussion options

You must be logged in to vote

@Jakobud afaik you can't mix callback mode with stream mode.

fs.createReadStream(fileInput)
    .pipe(got.stream.put(url, options))
    .on('response', (res) => { });
    .pipe(process.stdout);

Such questions are better asked at Stack Overflow

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by sindresorhus
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #102 on December 10, 2020 17:22.