I can't figure out how to cancel a fetch stream. I tried the following code, which didn't cancel the stream.
fetch(url).then(function(response) {
response.body.cancel()
})
I can't figure out how to cancel a fetch stream. I tried the following code, which didn't cancel the stream.
fetch(url).then(function(response) {
response.body.cancel()
})
As you can see in this open issue, at the time of writing, it's not possible to abort a fetch
stream.
Take a look at this other answer: How do I cancel an HTTP fetch() request?