一.所花时间
6小时
二.代码量
400行
三.博客量
1篇
四.了解到的知识点
学习了axios的使用
axios({
method:'post',
url:'http://localhost:8080/article/add',
data:article
}).then(result=>{
//成功的回调
//result代表服务器相应的所有的数据,包含了响应头,响应体 result.data代表的是接口响应的核心数据
console.log(result.data);
}).catch(err=>{
console.log(err);
});
//别名的方式发送请求
axios.get('http://localhost:8080/article/getAll').then(result=>{
//成功的回调
//result代表服务器相应的所有的数据,包含了响应头,响应体 result.data代表的是接口响应的核心数据
console.log(result.data);
}).catch(err=>{
console.log(err);
});
浙公网安备 33010602011771号