【发布时间】:2022-12-04 17:02:39
【问题描述】:
here is the code and the data result
我尝试使用 fetch 方法工作,但使用 'axios' 它没有
【问题讨论】:
标签: javascript node.js typescript function next.js
here is the code and the data result
我尝试使用 fetch 方法工作,但使用 'axios' 它没有
【问题讨论】:
标签: javascript node.js typescript function next.js
来自我的other answer:
您收到 Brotli (br) 编码。只需将 Accept-Encoding 标头传递给 deflate,服务器就会返回一个 json 输出。
await axios.get('https://jsonplaceholder.typicode.com/todos/1', {
headers: {
'Accept-Encoding': 'deflate'
}
})
【讨论】: