这是我的google脚本: function doAll(){
var url = 'https://myherokuapp.herokuapp.com/createfacultylist';
var response = UrlFetchApp.fetch(url);
var json = response.getContentText();
var data = JSON.parse(json);
Browser.msgBox(data.message);
var url2 = 'https://myherokuapp.herokuapp.com/updatefacultylist';
var response2 = UrlFetchApp.fetch(url2);
var json2 = response2.getContentText();
var data2 = JSON.parse(json2);
Browser.msgBox(data2.message);
var url3 = 'https://myherokuapp.herokuapp.com/test';
var response3 = UrlFetchApp.fetch(url3);
var json3 = response3.getContentText();
var data3 = JSON.parse(json3);
Browser.msgBox(data2.message);
}
在脚本的前两次调用之后它没问题,但是当我第三次调用它时它会返回:
https://myherokuapp.herokuapp.com/createfacultylist请求失败 返回代码503.截断的服务器响应: ...(使用muteHttpExceptions 检查完整响应的选项)
答案 0 :(得分:0)
尝试插入以下内容来限制您的来电:
utilities.sleep(1000
)