1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'; axios.defaults.transformRequest = [function (data, config) { if ((config['Content-Type']+"").toLowerCase().startsWith('multipart/form-data')) { return data } let ret = '' for (let it in data) { ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&' } return ret }]
|