axios设置application/x-www-form-urlencoded

this.$axios({
       method: 'post',
       url: 'http://www.17huo.com/tusou/deeplorSearch.html',
       headers: {
         'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
       },
       data: { imgFile: url },
       params: { imgFile: url }
     }).then(data => {
       console.log(data)
     })

data和params都必须传递,最好仍是让后端设置支持application/jsonhtml

相关文章
相关标签/搜索