【发布时间】:2016-03-16 21:29:41
【问题描述】:
连续 api:https://www.streak.com/api/
我尝试将这个 streak api 与 GAS UrlService 一起使用,并找到了获取请求的正确语法。但我没有找到 put 和 post 的正确语法:
(1) f.e.创建盒子
var RequestArguments = {
"contentType": "application/json",
"headers":{
"User-Agent": "MY_APP_NAME",
"Authorization": "Basic " + Utilities.base64Encode(streakApiKey),
},
"validateHttpsCertificates" :false,
"method": "PUT",
"????": "????"
};
var result = UrlFetchApp.fetch(RequestUrl,RequestArguments);
(2) f.e.编辑框
var RequestArguments = {
"contentType": "application/json",
"headers":{
"User-Agent": "MY_APP_NAME",
"Authorization": "Basic " + Utilities.base64Encode(streakApiKey),
},
"validateHttpsCertificates":false,
"method": "PUT",
"????": "????"
};
var result = UrlFetchApp.fetch(RequestUrl,RequestArguments);
【问题讨论】: