Fetch support for explicit resource management
jasnell opened this issue · comments
James M Snell commented
What is the issue with the Fetch Standard?
This goes along with the streams-specific related discussion here: whatwg/streams#1307
What, if any, support should the fetch spec adopt for explicit resource management (https://github.com/tc39/proposal-explicit-resource-management). I'm specifically thinking of the Request
and Response
objects here. Let's focus tho more generally on anything that includes the Body
mixin...
Should Body
be disposable and what would that mean?
using response = await fetch('http://example.org');
Specifically, if the body payload has not been fully read, would dispose cancel the remaining read and cause outstanding promises to be rejected? Or should Request
/Response
/Body
just not be disposable?