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

解决办法:在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'
            }
 })

 

相关文章:

  • 2022-12-23
  • 2021-07-13
  • 2022-12-23
  • 2021-10-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
猜你喜欢
  • 2021-11-20
  • 2021-08-10
  • 2022-02-28
  • 2022-01-21
  • 2022-12-23
  • 2022-12-23
  • 2021-08-28
相关资源
相似解决方案