【发布时间】:2015-06-24 04:23:46
【问题描述】:
我尝试使用 ajax 从下面的 url 获取响应数据
http://recipesid.appspot.com/api.user?method=user.query&email=dam.le@anttek.com
但它无论如何都不会运行。
帮我解决问题
$.ajax({
type: "GET", //rest Type
dataType: 'jsonp', //mispelled
url: "http://recipesid.appspot.com/api.user?method=user.query&email=dam.le@anttek.com",
async: false,
contentType: "application/json; charset=UTF-8",
success: function (msg) {
alert(msg);
},
error:
function(data){
alert("error");
} });
提前致谢!!
【问题讨论】:
-
“无论如何都无法运行”是什么意思?需要说出你的期望,发生了什么,你有什么错误/调试信息!!
-
这意味着它总是返回错误。
-
您想告诉我们错误是什么吗?
-
当我使用hurl.it 来测试我的网址时。替代协议:80:quic,p=0 内容长度:213 内容类型:应用程序/json; charset=UTF-8 日期:2015 年 6 月 24 日星期三 04:29:21 GMT 服务器:Google 前端并返回真实结果
-
我正在使用 java 在谷歌应用引擎中创建这个应用程序。
标签: javascript jquery ajax json google-app-engine