Skip to content

Commit fa6548e

Browse files
erdahujabitinn
authored andcommitted
fix: add the autoClose: true to download file example (node-fetch#441)
close node-fetch#375
1 parent 989c843 commit fa6548e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ fetch('http://domain.invalid/')
8080

8181
fetch('https://assets-cdn.github.com/images/modules/logos_page/Octocat.png')
8282
.then(res => {
83-
const dest = fs.createWriteStream('./octocat.png');
83+
const dest = fs.createWriteStream('./octocat.png', {
84+
autoClose: true,
85+
});
8486
res.body.pipe(dest);
8587
});
8688

0 commit comments

Comments
 (0)