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

Re: [whatwg] [Fetch] ambiguity problem?

From: Brian Kardell <bkardell@gmail.com>
Date: Tue, 12 Aug 2014 09:10:19 -0400
Message-ID: <CADC=+jehV6_Cfm2c7GYTrsq1Od0scpQA1ukkogODWPn0sbaCwg@mail.gmail.com>
To: whatwg@whatwg.org
On Aug 12, 2014 9:07 AM, "Brian Kardell" <bkardell@gmail.com> wrote:
>
> Not wanting to start a giant bikeshed here but if you have a look at
Jake's Service Worker Examples as an early use of fetch and streams, it
seems clear that many developers would be surprised by behavior of not
being about to refer back to the response body.  I'd like to suggest that
this is less a problem with service workers and more with the (current at
least) unfamiliarity with the idea that body is a stream, and maybe a lack
of recognizable way to tell the difference from native apis.  It seems like
this is always going to be the case with code using fetch, not unique to
ServiceWorkers.  I think that commonly as developers we are used to
response being a string or an already parsed object or something, and since
both will persist in the platform.  As such, I'd like to pose the idea of
changing the IDL in
>
> 5.4 Response Class
>
> To add the word stream.  I think in this case, the extra characters
aren't bad and the clarity outweighs the cost.  As in:
>
> readonly attribute FetchBodyStream bodyStream;
>
>

Whoops, missing link http://jakearchibald.com/2014/reading-responses/
Received on Tuesday, 12 August 2014 13:10:52 UTC

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