axios.defaults.headers[‘Content-Type‘] = ‘application/x-www-form-urlencoded;charset=UTF-8‘ axios.defaults.transformRequest = [data=> { let ret = ‘‘ for (let it in data) { ret += encodeURIComponent(it) + ‘=‘ + encodeURIComponent(data[it]) + ‘&‘ } return ret }]
原文地址:https://www.cnblogs.com/wenxiangxu/p/9178898.html
时间: 2024-11-13 03:32:42