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

Fwiw, you can do:

```js
const method = request.method;
const headers = [...request.headers];
const body = await request.blob();
const idbData = { method, headers, body };
```

…and you can now store `idbData` in IDB, and reconstruct the request with:

```js
const { method, headers, body } = idbData;
const request = new Request(body, { method, headers });
```

That should cover most cases.

-- 
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-781903067

Received on Friday, 19 February 2021 07:57:40 UTC