axios请求使用
首先进行安装axios
可以使用 yarn安装 命令如下: yarn add axios
执行get请求
axios.get(‘/user‘,{
params:{ id:13}
}).then(function (response) {
console.log(response)
}).catch(function (err)
{
console.log(err)
})
执行 POST
请求
axios.post(‘/user‘, {
|
执行多个并发请求
function getUserAccount() {
|
原文:https://www.cnblogs.com/luhan930/p/15236467.html