Re: [whatwg/fetch] FetchObserver (for a single fetch) (#607)

Hmm, just did some backend server stuff where i receive a request event (in particular true for deno, service worker and cloudflare workers) where things are not initiated by a fetch call
And i would like to get the progress out of them too
So a fetchObserver init option where you pass it down via 2nd argument to `fetch()` wouldn't work...

but this could:
```js
globalThis.addEventListener('fetch', evt => {
  const request = evt.request
  const response = new Response(...)

  response.onprogress = 
  request.onprogress = console.log

  evt.respondWith(response)
})
```

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

Message ID: <whatwg/fetch/issues/607/1533892780@github.com>

Received on Wednesday, 3 May 2023 23:55:43 UTC