js/Request.js
function handler(responseCode, data, ioArgs) {
                    that.xhr = ioArgs.xhr;
                    that.statusCode = that.xhr && !that.xhr.timedOut && that.xhr.status || 0;
                    if (that.canceled) {
                        logger.debug("Request [" + that.id + "] was canceled, not calling handler");
                    } else {
                        that.pending = false;
                        that.complete = true;
                        paramHandler(responseCode, data, ioArgs);
                    }
                }
function handler(responseCode, data, ioArgs) {
                    that.xhr = ioArgs.xhr;
                    that.statusCode = that.xhr && !that.xhr.timedOut && that.xhr.status || 0;
                    if (that.canceled) {
                        logger.debug("Request [" + that.id + "] was canceled, not calling handler");
                    } else {
                        that.pending = false;
                        that.complete = true;
                        paramHandler(responseCode, data, ioArgs);
                    }
                }
function handler ( responseCode , data , ioArgs ) { that . xhr = ioArgs . xhr ; that . statusCode = that . xhr && ! that . xhr . timedOut && that . xhr . status || 0 ; if ( that . canceled ) { logger . debug ( "Request [" + that . id + "] was canceled, not calling handler" ) ; } else { that . pending = false ; that . complete = true ; paramHandler ( responseCode , data , ioArgs ) ; } }
wrap the handler callbacks in a cancel check
wrap the handler callbacks in a cancel check