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

Re: [whatwg] [Fetch] API changes to make stream depletion clearer/easier

From: Jake Archibald <jaffathecake@gmail.com>
Date: Thu, 21 Aug 2014 18:27:57 +0100
Message-ID: <CAJ5xic8dp9s-npkW9U-2hy4m400RUFu_GpwbJ3T4_duu2E79qA@mail.gmail.com>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: WHATWG <whatwg@whatwg.org>
On 21 August 2014 13:27, Anne van Kesteren <annevk@annevk.nl> wrote:

> On Thu, Aug 21, 2014 at 11:02 AM, Jake Archibald <jaffathecake@gmail.com>
> wrote:
> > * The as* methods should be directly on the response, and named
> consumeAs*,
> > so response.consumeAsJSON()
>
> Would it be really bad to have these names four characters longer to
> indicate they are about the body of the response? Then we'd have:
>
> consumeBodyAsJSON()
> consumeBodyAsText()
>

Worried we're making common functions really long here, like
querySelectorAll.

Going from

response.body.asJSON()
to
response.consumeAsJSON()
wasn't *too* bad, but
response.consumeBodyAsJSON()
is getting a bit proxyfactorybeangenerator.


>
> and
>
> canConsumeBody
>

This isn't too bad.
Received on Thursday, 21 August 2014 17:28:37 UTC

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