console.log(res)
})
发送post请求携带参数,直接使用"name=张三&age=10"
5、axios的**并发请求**
使用spread方法处理响应数组结果
6、axios的**全局配置**
7、axios的**实例**
let newVar = axios.create({
baseURL:'http://localhost:9999/student/student',
timeout:5000
}) //创建axios实例
newVar({
url:'getAllStudent'
}).then(res=>{
console.log(res)
})
8、axios的**拦截器**
拦截器的作用:用于我们在网络请求的时候在发请求或响应时对操作进行相应的处理
发起请求可以添加网页加载的动画 强制登录
响应的时候可以进行相应的数据处理
**请求方向**的: