- From: Anne van Kesteren <annevk@annevk.nl>
- Date: Mon, 23 Jun 2014 17:28:36 +0200
- To: Adam Barth <w3c@adambarth.com>
- Cc: Joshua Peek <josh@joshpeek.com>, WHATWG <whatwg@whatwg.org>
On Mon, Jun 23, 2014 at 5:11 PM, Adam Barth <w3c@adambarth.com> wrote: > XMLHttpRequest isn't particularly cleanly layered. It's sounds like > you're not overly concerned about layering, which is probably fine. I think I see what you mean. If you wanted to implement this in terms of JavaScript then indeed you would end up importing several modules other than the fetch module to implement these methods. E.g. encoding, for asText, filesystem and MIME for asBlob, and encoding and JSON for asJSON. For asHTML you'd need encoding and HTML. This seems fine to me. However, I could see it instead has to go the other way around. Instead of having a bunch of methods on stream to convert it into various other pieces. Other pieces could have ways of dealing with streams. That might make coding a bit more awkward though. -- http://annevankesteren.nl/
Received on Monday, 23 June 2014 15:29:02 UTC