W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2014

Re: [whatwg] [Fetch] ambiguity problem?

From: Anne van Kesteren <annevk@annevk.nl>
Date: Tue, 12 Aug 2014 19:27:41 +0200
Message-ID: <CADnb78hrrRXCrX62vt3ZLKtGNjWZ+9k9B61i3E9a_oPoP1w23g@mail.gmail.com>
To: Brian Kardell <bkardell@gmail.com>
Cc: WHATWG <whatwg@whatwg.org>
On Tue, Aug 12, 2014 at 7:22 PM, Brian Kardell <bkardell@gmail.com> wrote:
> If I do
>
> console. log(o.responseText);
> console. log(o.responseText);
>
> The second one will be what?  The response text or nada? Isn't the later
> more analogous to what we're taking about here when it's a stream?  It feels
> like it's reaching for consistency but could explain how it works either
> way..

That we store it on XMLHttpRequest is somewhat buggy, but that you can
only get either JSON or a string is in the right direction and what I
meant. Now we have promises we no longer need to store a copy on an
object, but can just return the value.

If you do asText() we could store the result on the Response object so
it would work for multiple invocations, but that seems silly.


-- 
http://annevankesteren.nl/
Received on Tuesday, 12 August 2014 17:28:12 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:22 UTC