msl-server-node/mslMiddleware.js
function getInterceptedXHR(req) {
        var requestPath = req.requestPath;
        var interceptedXHRs = interceptXHRMap[requestPath];

        var interceptedXHRsObj = {};
        var counter = 1;
        if (interceptedXHRs != undefined) {
            for (var i = 0; i < interceptedXHRs.length; i++) {
                interceptedXHRsObj["xhr_" + counter] = interceptedXHRs[i];
                counter++;
            }
        }

        return interceptedXHRsObj;
    }
function getInterceptedXHR(req) {
        var requestPath = req.requestPath;
        var interceptedXHRs = interceptXHRMap[requestPath];

        var interceptedXHRsObj = {};
        var counter = 1;
        if (interceptedXHRs != undefined) {
            for (var i = 0; i < interceptedXHRs.length; i++) {
                interceptedXHRsObj["xhr_" + counter] = interceptedXHRs[i];
                counter++;
            }
        }

        return interceptedXHRsObj;
    }
function getInterceptedXHR ( req ) { var requestPath = req . requestPath ; var interceptedXHRs = interceptXHRMap [ requestPath ] ; var interceptedXHRsObj = { } ; var counter = 1 ; if ( interceptedXHRs != undefined ) { for ( var i = 0 ; i < interceptedXHRs . length ; i ++ ) { interceptedXHRsObj [ "xhr_" + counter ] = interceptedXHRs [ i ] ; counter ++ ; } } return interceptedXHRsObj ; }
Returns the intercepted XHRs

@param req => XHR containing request path to look up (request query string contains request path)
@return returns object containing list of XHRs with key xhr_#
Returns the intercepted XHRs