常用get和post方法
axios({
url:xxx
method:'get'
parames:{}
}).then(res=>{
console.log(res)
})
axios({
url:xxx
method:'post'
parames:{}
}).then(res=>{
console.log(res)
})
本文详细介绍了如何在JavaScript中使用axios库进行GET和POST方法的API请求,通过实例展示了如何设置URL、方法和参数,并处理响应数据。
常用get和post方法
axios({
url:xxx
method:'get'
parames:{}
}).then(res=>{
console.log(res)
})
axios({
url:xxx
method:'post'
parames:{}
}).then(res=>{
console.log(res)
})
1万+
1万+
6128
3687

被折叠的 条评论
为什么被折叠?
