【发布时间】:2012-07-17 18:59:54
【问题描述】:
每次我尝试使用 sencha touch 获取 json 提要时,我总是会收到此错误。
XMLHttpRequest cannot load http://api.example.com/index.php/news/all/format/json?_dc=1342630239638&node=root. Request header field X-Requested-With is not allowed by Access-Control-Allow-Headers.
我怎样才能解决这个问题,我真的很想使用 sencha,但我的大部分工作都将使用 json 提要???
任何帮助
我的 json 输出看起来像这样它没有 rootproperty 节点??
[{
"id": "7253",
"title": "hello",
"description": "",
"source": "syrianews",
"cat_name": "Syrianews"
}, {
"id": "7208",
"title": "hello",
"description": "",
"source": "syrianews",
"cat_name": "Syrianews"
}]
【问题讨论】:
-
你如何访问 JSON 文件?给我看。
标签: json extjs sencha-touch-2