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

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()

and

canConsumeBody

as indication whether or body is still available for consumption. All
other members of the Request object explicitly name what they are
about, seems a bit of a miss to not do that there.


-- 
http://annevankesteren.nl/

Received on Thursday, 21 August 2014 12:27:29 UTC