Re: [fetch] Initializing context/content specific fetch defaults (#43)

So `Accept` and `Accept-Language` are set by pretty much all contexts except for "fetch". `EventSource` sets an header but it needs to set that itself. (Also, I'm not sure it makes sense to allow `fetch(url, {as:"eventsource"})`. Perhaps we should limit the allowed values initially.) I could come up with language for `Accept` and `Accept-Language` I think.

Re: "useful for SW only". There is no `Blob` for opaque responses. So we'd need some new API that creates a URL from a `Response` to make that work in such a way. I was even thinking that it might be nice if that API could take a promise, so you could have:

    img.src = createResponseURL(fetch(url, {as:"image"}))

(The other reason why I think we want it for a `Response` rather than a body of sorts is that then we keep the response headers available.)

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/43#issuecomment-93332389

Received on Wednesday, 15 April 2015 11:18:22 UTC