Re: [whatwg] Questions about the Fetch API

On Tue, Jul 8, 2014 at 11:35 AM, Juan Ignacio Dopazo
<jdopazo@yahoo-inc.com> wrote:
> - And more importantly, why does fetch() return a Promise<Response> instead of a Response?

Because you aren't allowed to do network fetches sync.  (And if you
have an async action, returning a Promise for its result is the
idiomatic way to do it, rather than, say, making the object itself
asynchronous in some way.)

~TJ

Received on Wednesday, 9 July 2014 06:02:55 UTC