fetch 是一个全局api 可以用来发起http请求
fetch('url',{
method:'post',
headers:{
auth:'1234'
},
body:'123',
}).then(()=>{
}).catch(()=>{})
fetch('url',{
method:'post',
headers:{
auth:'1234'
},
body:'123',
}).then(()=>{
}).catch(()=>{})
转载于:https://my.oschina.net/u/3971746/blog/3034356