我一直試圖在AngularJS,保持一些統計數據的跟蹤,並允許用戶將其提交到谷歌Apps腳本進行進一步處理的應用。一切工作在計算機上完美。我已經在Chrome和Firefox中測試過它,但是當我嘗試在iPad上提交時,它顯示以下錯誤:405不允許的方法 - 適用於一切,除了iOS的Safari瀏覽器
加載資源失敗:服務器響應狀態爲405(方法不允許)
加載資源失敗:無法從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.
請幫忙!
我已在下面發佈更新 –