尝试使用Ripple Emulator测试PhoneGap应用程序.我们正在向服务器发出请求并接收: 错误: cordova :: XMLHttpRequest :: setRequestHeader does not work with JSONP. a)在服务器和客户端上启用CORS b)请求在浏览
错误:
cordova :: XMLHttpRequest :: setRequestHeader does not work with JSONP.
> a)在服务器和客户端上启用CORS
> b)请求在浏览器中工作
> c)请求适用于移动设备
> d)我在Ripple Chrome扩展程序的设置中启用了“允许访问文件网址”.
> e)我用旗帜推出了chrome:
–disable-web-security –allow-file-access-from-files
Ripple Emulator是否支持CORS httprequest或仅支持jsonp?
如果它支持来自JSONP以外的调用,那么我可以在实现上使用一些帮助.
谢谢!
Ripple Emulator确实支持CORS httprequest,但您需要将html页面作为计算机上的网站托管,并使用http://localhost/yourvirtualdir/yourfile.html进行访问.