【发布时间】:2013-06-04 20:47:21
【问题描述】:
我有以下代码:
var temp = { 'key': '***.....zWw' };
$.ajax({
url: 'https://mandrillapp.com/api/1.0/users/ping.json.',
type: 'POST',
data: temp,
success: function(result) {
console.log(result);
}
});
这是回应:
{"status":"error","code":-99,"name":"UserError","message":"Unknownmethod\"users.ping.json\""}
我在网上搜索,我找不到这个错误,所以我只能猜测我做错了什么,很简单。
我已经删除并添加了新的密钥,我也试过了,但仍然是这个错误。
我也看过 Google 讨论,但那里没有乐趣。
有人有想法吗?
【问题讨论】:
-
确认你使用的host url是否正确,我发现json后面有个句号,可能会报错