Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 拦截传出的浏览器HTTP请求_Jquery_Http_Interceptor - Fatal编程技术网

Jquery 拦截传出的浏览器HTTP请求

Jquery 拦截传出的浏览器HTTP请求,jquery,http,interceptor,Jquery,Http,Interceptor,我有一个web应用程序。我的应用程序是否可以监视源自我的应用程序的所有传出客户端浏览器HTTP请求?如果是,是否可以拦截它们并随意取消它们?特别是有JQuery HTTP拦截器吗?使用ajaxSetup.beforeSend的JQuery可以实现这一点 $.ajaxSetup({ beforeSend: function(xhr) { //do your stuff here } }); 这是一个有趣的问题。。用例是什么?

我有一个web应用程序。我的应用程序是否可以监视源自我的应用程序的所有传出客户端浏览器HTTP请求?如果是,是否可以拦截它们并随意取消它们?特别是有JQuery HTTP拦截器吗?

使用ajaxSetup.beforeSend的JQuery可以实现这一点

$.ajaxSetup({
  beforeSend: function(xhr) {
      //do your stuff here
  }
});

这是一个有趣的问题。。用例是什么?