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:
Russell Dempsey 2022-05-20 05:55:15 -07:00 committed by GitHub
parent 043a5fcfc8
commit 6ae9c76481
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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()]);