Javascript Phonegap-Javascript发送跨域ajax请求
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13920782/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Phonegap-Javascript sending cross-domain ajax request
提问by Pharaz Fadaei
I'm using PhoneGap and JavaScript to produce an iPhone app. Is it possible to send a cross-domain AJAX (POST) request and download the response as HTML? (ex.: sign into yahoo mail and fetch new mails)
我正在使用 PhoneGap 和 JavaScript 来生成 iPhone 应用程序。是否可以发送跨域 AJAX (POST) 请求并将响应下载为 HTML?(例如:登录雅虎邮箱并获取新邮件)
回答by Chris Sobolewski
Cordova/PhoneGap allow for whitelistingof domains. As long as the server you are requesting is in the whitelist.
Cordova/PhoneGap 允许将域列入白名单。只要您请求的服务器在白名单中。

