Get request headers from received request in fetch event.
I am trying to get the headers of received requests, but end up getting null for the following code:
3 Replies
oh, so it's req.headers.entries()? thanks
Entries returns an iterator of key/value pairs (https://developer.mozilla.org/en-US/docs/Web/API/Headers/entries)
Object.fromEntries
turns that into an object which you can then stringify - or generally do whatever with