【发布时间】:2014-06-12 05:26:23
【问题描述】:
我一直在尝试在 AngularJS 中创建一个应用程序来跟踪一些统计数据并允许用户将它们提交到谷歌应用程序脚本以进行进一步处理。一切都在计算机上完美运行。我已经在 chrome 和 firefox 中测试过,但是当我尝试在 iPad 上提交时,它显示以下错误:
加载资源失败:服务器响应状态为 405 (Method Not Allowed)
加载资源失败:无法从 null 发出任何请求。
XMLHttpRequest 无法加载 https://script.googleusercontent.com/macros/echo?user_content_key=UQXGbRq6...HLV301R。无法从 null 发出任何请求。
var URL = 'https://script.google.com/macros/s/.../exec';
$http.post(URL,
$.param({ packet: JSON.stringify($scope.data) }), {
headers: {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
}
}
).success(function(data, status) {
alert(data.packet);
$scope.rollover();
}).error(function(data, status) {
console.log(data);
console.log(status);
$scope.show_status(data);
});
它在控制台中打印几行。数据行为空,返回状态为404。
请帮忙!
【问题讨论】:
-
我在下面发布了更新
标签: javascript angularjs mobile-safari http-status-code-405