Reputation: 1653
I am doing a web application, which creates a lot of post & get requests.
I can see all the requests using Develop Tools in Mozilla/Chrome, and also in Charles (application).
Is it possible to create a jquery/javascript function which will listen for all requests on current page, and will alert each request to me?
Something similiar to Jquery .click() function.
example:
$('body').post(function() {
alert(this.Url + this.Parameters);
});
I googled, and couldn't find, hope there is a way.
Upvotes: 0
Views: 228
Reputation: 3202
Yes,in Jquery you have Global Ajax Event Handlers
These methods register handlers to be called when certain events, such as initialization or completion, take place for any Ajax request on the page
refer the Documentation
Upvotes: 4