Re: [w3c/ServiceWorker] Replaying POST requests (#693)

If we wanted to provide a convenience for this use case maybe we could add a `RequestQueue` concept or something.  Something like:

```javascript
let c = await caches.open("foo");

// add something to a queue
await c.enqueueRequest(FetchEvent.req);

// pop the next item off the queue
let req = await c.dequeueRequest(url);

// drain the entire queue in one go
let reqList = await c.drainRequests(url);
```

This would avoid the matching problem.  All the posts match the same URL/vary combination.  We just don't overwrite.  Instead we queue the requests and don't have a response associated at all.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/693#issuecomment-385100227

Received on Friday, 27 April 2018 21:35:12 UTC