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

相關文章
相關標籤/搜索