【发布时间】:2022-01-14 17:48:46
【问题描述】:
我试图从响应对象中读取一个值,但是这个
fetch("https://api.nft.storage/upload", options)
.then((response) => response.json())
.then((response) => console.log(response))
.then((response) => {
console.log(response.value.cid);
}
... 不起作用。虽然我的控制台显示正在发送的对象:
.. 我得到这个错误:
Unhandled Rejection (TypeError): Cannot read properties of undefined (reading 'value')
1056 | .then((response) => response.json())
1057 | .then((response) => console.log(response))
1058 | .then((response) => {
> 1059 | console.log(response.value.cid);
【问题讨论】:
标签: javascript object response ipfs