axios
axios({//axios默认为get请求
url:'http://jsonplaceholder.typicode.com/posts',
method:'post',//方法,参数通过post方法发送给后台的数据类型默认为json格式
// params:{//get请求时的参数
// },
data:{//post请求时的参数
}
}).then(response=>{
console.log(response)
}).c
原创
2020-05-17 18:33:39 ·
105 阅读 ·
0 评论