weixin_33743703 2016-06-02 17:50 采纳率: 0%
浏览 26

从XHR对象捕获URL

I have this code:

    (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);
        };
    })();   

And I have this log:

enter image description here

The question is... How can I catch this URL to process with a RegEx?

  • 写回答

0条回答 默认 最新

    报告相同问题?