【发布时间】:2021-11-13 14:06:33
【问题描述】:
var axios = require('axios')
var data = JSON.stringify({ pair: 'ADA/LCX' })
var config = {
method: 'post',
url: 'https://exchange-api.lcx.com/order/book',
headers: {
'Content-Type': 'application/json',
},
data: data,
}
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data))
})
.catch(function (error) {
console.log(error)
})
我想将此代码插入到 html 表中。 当我在 cmd 上运行 i 得到结果时,我必须将文件复制到我的桌面上,或者我无法将结果发送到 json 文件的 html whitout 副本?
【问题讨论】:
标签: javascript html node.js reactjs fetch-api