Open
Description
Hello Team,
Looks like response.clone()
does not work as expected when trying to re-read the response.
const myRequest = new Request('https://restcountries.com/v3.1/region/europe');
fetch(myRequest)
.then((response) => {
const response2 = response.clone();
response.json().then((myRes) => {
console.log('Response', myRes);
});
response2
.json()
.then((myRes) => {
console.log('Response2 --->', myRes);
})
.catch((e) => {
console.log('@@@@@@');
console.log(e);
console.log('@@@@@@');
});
});
@@@@@@
[TypeError: This stream has already been locked for exclusive reading by another reader]
@@@@@@```
Metadata
Assignees
Labels
No labels