问题描述
/**
* Get Volume .
* @customfunction
* @param {string} companyId
* @param {string} date
*/
async function getVolume(companyId,date) {
//You can change this URL to any web request you want to work with.
var myHeaders = new Headers();
myHeaders.append(
"Authorization","Bearer token_value"
);
var requestOptions = {
method: "GET",headers: myHeaders
};
const url = `url value`;
const response = await fetch(url,requestOptions);
console.log(response);
//Expect that status code is in 200-299 range
if (!response.ok) {
throw new Error(response.statusText);
}
const jsonResponse = await response.json();
return jsonResponse;
}
当我使用邮递员发出请求时,它可以工作,但在excel scriptlab中出错。请任何人指导我解决此错误。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)