can Response.body.cancel() terminate an ongoing Response.json()?
Closed this issue · 4 comments
wanderview commented
annevk commented
That's why we'll have response.json().cancel()
, no?
wanderview commented
Maybe I got confused from this conversation about cancelable promises on #whatwg:
yutakahirano commented
Response.body.cancel() is callable only when the body is not locked by anyone. Hence it is not callabled when Response.json() is running.
domenic commented
To answer the OP's question: yes, it would prevent it from being canceled (except by response.json().cancel()
, i.e. eventual cancelable promises) and yes, this is OK.