fix: add the autoClose: true to download file example (#441)
close #375
This commit is contained in:
parent
989c8434a9
commit
fa6548ed31
|
@ -80,7 +80,9 @@ fetch('http://domain.invalid/')
|
|||
|
||||
fetch('https://assets-cdn.github.com/images/modules/logos_page/Octocat.png')
|
||||
.then(res => {
|
||||
const dest = fs.createWriteStream('./octocat.png');
|
||||
const dest = fs.createWriteStream('./octocat.png', {
|
||||
autoClose: true,
|
||||
});
|
||||
res.body.pipe(dest);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue