docs(readme): response.clone() is not async (#1560)
source code shows response is a sync call to a new Response constructor: 3944f24770/src/response.js (L84-L101)
This commit is contained in:
parent
043a5fcfc8
commit
6ae9c76481
|
@ -594,7 +594,7 @@ The recommended way to fix this problem is to resolve cloned response in paralle
|
|||
import fetch from 'node-fetch';
|
||||
|
||||
const response = await fetch('https://example.com');
|
||||
const r1 = await response.clone();
|
||||
const r1 = response.clone();
|
||||
|
||||
const results = await Promise.all([response.json(), r1.text()]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue