Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6ae9c76

Browse files
authored
docs(readme): response.clone() is not async (#1560)
source code shows response is a sync call to a new Response constructor: https://github.com/node-fetch/node-fetch/blob/3944f24770b442e519eaff758adffc9ca0092bdb/src/response.js#L84-L101
1 parent 043a5fc commit 6ae9c76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ The recommended way to fix this problem is to resolve cloned response in paralle
594594
import fetch from 'node-fetch';
595595

596596
const response = await fetch('https://example.com');
597-
const r1 = await response.clone();
597+
const r1 = response.clone();
598598

599599
const results = await Promise.all([response.json(), r1.text()]);
600600

0 commit comments

Comments
 (0)