Closed domenic closed 9 years ago
Looks good for Request, but how about Response / ResponseInit? I'm a bit confused about the inconsistency of initialization ways between Request and Response. @annevk, can you tell me why?
@yutakahirano well, typically, requests are about URLs and responses are about data. It seemed to make sense to match to make the common case convenient. Open to suggestions.
After thinking about this for a while I can't see a way to make it work great for Response and so I am retracting it. I posted to whatwg@whatwg.org to ask for any other options but unless there is a great idea I am OK with overloading the body option (in both cases) so that when given a function it exposes the writable stream.
See discussion in f4609c95c4743a16f2192aa37386a746f02e2bd3 and slightlyoff/ServiceWorker#413.