Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have few xhr requests as follows,

JavaScript
var promise=[];
promise[0]=.WinJS.xhr({
        type: "POST",
        url: "some url",
        data: somedata,
        headers: { "Content-type": "application/json; charset=utf-8" },
        //  responseType: "json"
    }).then(function(success){}, function(error){});

promise[1]=.WinJS.xhr({
        type: "POST",
        url: "some url",
        data: somedata,
        headers: { "Content-type": "application/json; charset=utf-8" },
        //  responseType: "json"
    }).then(function(success){}, function(error){});
promise[2]=...
.
.
.

Now i will cancel few requests for e.g promise[0], promise[5],

JavaScript
promise[0].cancel();
promise[5].cancel();

Now on join I want to know which all requests are cancelled,

JavaScript
WinJS.Promise.join(promise).done(function(xhr){
//here i should be able to check which requests are cancelled
});
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900