fix: add the autoClose: true to download file example (#441)

close #375
This commit is contained in:
Deepak 2018-04-08 07:57:47 +05:30 committed by David Frank
parent 989c8434a9
commit fa6548ed31
1 changed files with 3 additions and 1 deletions

View File

@ -80,7 +80,9 @@ fetch('http://domain.invalid/')
fetch('https://assets-cdn.github.com/images/modules/logos_page/Octocat.png') fetch('https://assets-cdn.github.com/images/modules/logos_page/Octocat.png')
.then(res => { .then(res => {
const dest = fs.createWriteStream('./octocat.png'); const dest = fs.createWriteStream('./octocat.png', {
autoClose: true,
});
res.body.pipe(dest); res.body.pipe(dest);
}); });