在 Mozilla Firefox 中使用 XMLHttp 对象异步调用时,出现以下异常。
407 Proxy Authentication Required
The ISA Server requires authorization to fulfill the request.
Access to the Web Proxy filter is denied.
原因描述:
实际上我正在尝试使用 JavaScript 中的 get 来发出异步请求。使用 IE 6 工作正常,但对于 IE 7 和 Firefox 3.5,它不会使用异步请求获取任何数据,那么如何克服这个问题呢?
当我使用 firebug 在 Firefox 3.5 中调试时,它显示
407 Proxy Authentication Required The ISA Server requires authorization to fulfil the request. Access to the Web Proxy filter is denied.
控制台出现异常,如何解决这个问题
注意:我们的网络有代理服务器
我知道我参加聚会有点晚了,但是,这个问题我遇到了完全相同的问题。 @FK82 指出了正确的解决方案,我想记录它,因为我已经尝试过并且它有效。
$.ajax({
url: "http://somefancyurl.com/api/do_it",
data: { id:"user" },
dataType: "jsonp",
success: function(data) {
console.log(data);
}
});
If I 不指定 jsonp我得到了407 需要代理验证错误。
- 尽管最初的问题没有指定 JQuery,但我能够使用这种方法和 JSONP 使用 FireFox 3.6.x 和 IE7 进行成功测试。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)