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

Re: [whatwg] Fetch API Polyfill

From: Anne van Kesteren <annevk@annevk.nl>
Date: Tue, 14 Oct 2014 12:03:38 +0200
Message-ID: <CADnb78gdEDxufKpjaab6rfVaGLjpaXe4G0fJ_4tQP6P9Rw477w@mail.gmail.com>
To: David Graham <david.malcom.graham@gmail.com>
Cc: WHATWG <whatwg@whatwg.org>
On Tue, Oct 14, 2014 at 1:15 AM, David Graham
<david.malcom.graham@gmail.com> wrote:
> We’re developing a polyfill for the new Fetch API at GitHub:
>    https://github.com/github/fetch
> The spec was fairly easy to follow, but I’d love any feedback on places the implementation could be improved. Fetch is probably the most exciting new browser API since querySelectorAll.

The example in README.md suggests your promise resolves too late. It
needs to resolve when all the HTTP headers are in. The body can then
be accessed through a series of promise methods. (And in the future
you can have access to a stream at that point as well.)

Received on Tuesday, 14 October 2014 10:04:04 UTC

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