application/json, application/json问题

axios({
                    method:'post',
                    url: axios.defaults.baseURL + "/login",
                    headers:{
                        'Content-Type': 'application/json'
                    },
                    data: {
                        'email': this.email,
                        'password': sha512(this.password),
                        'remember': this.autoLogin
                    }

代码是这样的,然后后台一直报错

Invalid mime type "application/json, application/json": Invalid token character ',' in token "json, application/json"]

后来 'Content-Type': 'application/json'后面加了个分号就好了,但是content type就成了这个

Content-Type: application/json;, application/json

太low了,不知道怎么解决了,搜也搜不到解决方案

https://www.cnblogs.com/leo2269/p/11056899.html

去掉 headers 应该就行了。 估计 axios 默认就是 application/json,你再加一个 content-type, 就被合并到一起变成逗号分隔的两个了