- From: Burak Tamtürk <notifications@github.com>
- Date: Sat, 07 May 2016 05:16:04 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc:
Received on Saturday, 7 May 2016 12:16:36 UTC
Something like this could also allow us to cancel requests manually (without timeout). ```javascript var cancelpromise1 = new Promise(function(resolve, reject) { setTimeout(resolve, 1000); }); var cancelpromise2 = /* a promise that will be resolved when user clicks cancel */; var lastpromise = Promise.race([cancelpromise1, cancelpromise2]); fetch(..., { timeout: lastpromise }) ... ``` --- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/issues/20#issuecomment-217632042
Received on Saturday, 7 May 2016 12:16:36 UTC