码迷,mamicode.com
首页 > 移动开发 > 详细

在使用Vue2.0中使用axios库时,遇到415错误

时间:2019-12-04 20:34:07      阅读:357      评论:0      收藏:0      [点我收藏+]

标签:请求   conf   信息   mamicode   bsp   info   utf-8   使用   reg   

技术图片

解决办法:在axios的第三个参数config中,设置请求头信息‘Content-Type‘: ‘application/json;charset=UTF-8‘

this.$http.post(registry, JSON.stringify(this.ruleForm2),{
            headers: {
              Content-Type: application/json;charset=UTF-8
            }
 })

 

在使用Vue2.0中使用axios库时,遇到415错误

标签:请求   conf   信息   mamicode   bsp   info   utf-8   使用   reg   

原文地址:https://www.cnblogs.com/arebirth/p/vue20erroraxios415.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!