0
我在Zapier代碼下面的代碼:這個響應對象是什麼意思? (Zapier JS代碼)
var settings = {
"url": "https://<HOST>/api/v1/siteinfo",
"method": "GET",
"crossDomain": true,
"headers": {
"authorization": "Basic <TOKEN>",
"cache-control": "no-cache"
}
}
fetch(settings.url, settings)
.then(function(res) {
return res.text();
})
.then(function(body) {
var output = {id: 1234};
callback(null, output);
})
.catch(function(error) {
callback(error.text());
};
我已經基本上從Zapier documentation複製。
運行此請求後,我得到這樣的迴應:
爲什麼有數據的大量的,一定的緩衝內容等,並不僅僅是簡單的{id: 1234}
?