Re: [whatwg/fetch] Aborting a fetch: The Next Generation (#447)

@rektide 

> 1. get notification of a PUSHed resource's url (& maybe headers) via observer.
> 2. create a fetch to consume that resource, which would pull from the registry. (This would still have to work for streaming data.)

I don't think using `fetch()` would work well here, as it'd be difficult to tell the difference between a push-cache hit or miss. However, I think the general idea is good…

```js
observePushSomehow(event => {
  console.log(event.request);
  event.claimResponse().then(response => {
    // …
  });
});
```

…where `claimResponse` would reject if it'd already been claimed. This would remove it from the push-cache too. Unclaimed responses would remain in the push-cache.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/447#issuecomment-275627127

Received on Friday, 27 January 2017 09:49:33 UTC