axios get与post请求
axios get与post请求
get请求
/api:url地址
params:{}中写参数
response:处理返回结果
1 | axios.get('/api', { |
post请求
qs.stringify()将对象 序列化成URL的形式,以&进行拼接(需要导入qs模块)
1 | axios.post('/api/api/login', qs.stringify( |
- Title: axios get与post请求
- Author: 九號
- Created at : 2020-02-18 10:00:00
- Updated at : 2024-08-31 16:57:41
- Link: https://jhao.me/posts/9143/
- License: This work is licensed under CC BY-NC-SA 4.0.
Comments