从XHR对象捕获URL

时间:2016-06-02 17:50:17

标签: jquery ajax regex url xmlhttprequest

我有这段代码:

    (function() {
        var origOpen = XMLHttpRequest.prototype.open;
        XMLHttpRequest.prototype.open = function() {
            console.log('request started!');
            this.addEventListener('load', function() {                  
                console.log('request completed!');
                console.log(this.readyState);
            });
        origOpen.apply(this, arguments);
        };
    })();   

我有这个日志:

enter image description here

问题是......我怎样才能抓住这个URL来处理RegEx?

0 个答案:

没有答案