【发布时间】:2019-09-04 16:14:47
【问题描述】:
我正在尝试从仅返回一串文本 ((here)) 的 API 中获取文本,并且在响应中将其抛出时遇到了麻烦。发布时,它显示为[object Response],而console.log 没有显示我想要的文字。
我正在使用的代码:
fetch('http://taskinoz.com/gdq/api').then(
function(response) {
console.log(response);
throttledSendMessage(channel, response);
return response;
})
.catch(function(error) {
throttledSendMessage(channel, "An error has occured");
})
日志可以是found here
感谢您与我一起寻找解决方案:/
【问题讨论】: