I'm doing a simple exercise where I use the Fetch API to interact with another website. The Fetch API resolves to a Response object. My next goal is to set a cookie
on this Response object, but I noticed that the headers property on the Response object is read-only. Perhaps there is something very simple that I've overlooked, but how can I set a cookie
in the Response object's header?
Edit: To clarify, the Response object returned by the Fetch call is what I want to return back to the client, but before I do that I want to set a cookie in the header so that the client will have a cookie
saved.