圣殿的近义词,涨幅榜,蒋一铭
electron-vue axios 注册
axios.defaults.baseurl = 'http://localhost:8888/' axios.defaults.headers.post['content-type'] = 'application/x-www-form-urlencoded;charset=utf-8'; axios.defaults.withcredentials = true vue.prototype.axios = axios
this.axios({ method: 'post', url: '/token', data: { grant_type: 'password', username: '11219000' }, }).then(function (response) { console.log(response.data); }).catch(function (error) { console.log(error); });
400(错误的请求。 )
axios的request body 错了
下面用ajax测试下:
我不知道了为什么,但传字符串好像能行,传对象会变成json,传字符串就和ajax一样了
哇 成功了.
嗯 到底是为什么....
到底是为什么....
为什么....
么....
....
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
asp.net搭建博客,使用BlogEngine.NET+MySql搭建博客
网友评论