- From: Jake Archibald <notifications@github.com>
- Date: Thu, 18 Feb 2021 23:57:28 -0800
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 19 February 2021 07:57:40 UTC
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