This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const got = require('got'); | |
| const stream = require('stream'); | |
| const fs = require('fs'); | |
| const { promisify } = require('util'); | |
| const pipeline = promisify(stream.pipeline); | |
| // instantiate the download stream - use options to set authorization header etc. if needed | |
| let downStream = got.stream('https://example.com/download'); | |
| downStream.on('response', response => { |
OlderNewer