- From: Burak Tamtürk <notifications@github.com>
- Date: Sat, 07 May 2016 05:22:52 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc:
Received on Saturday, 7 May 2016 12:25:38 UTC
Something like this just better than just specifying integer for timeout parameter. Manually cancelling the request is a thing. https://github.com/whatwg/fetch/issues/20#issuecomment-217632042 ```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/179#issuecomment-217632265
Received on Saturday, 7 May 2016 12:25:38 UTC