|
|
@@ -18,7 +18,16 @@ export default function ({ $axios, redirect, req, ...args }) {
|
|
|
// stringify post data
|
|
|
if (config.method === 'post') {
|
|
|
// config.headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';
|
|
|
- config.data = qs.stringify(config.data);
|
|
|
+ const data = config.data;
|
|
|
+ let formData = ''
|
|
|
+ for(const key in data) {
|
|
|
+ if(data.hasOwnProperty(key)) {
|
|
|
+ const element = data[key]
|
|
|
+ formData += `${key}=${element}&`
|
|
|
+ }
|
|
|
+ }
|
|
|
+ config.data = formData.slice(0, formData.length - 1);
|
|
|
+ // config.data = qs.stringify(config.data);
|
|
|
}
|
|
|
console.log('After, making request to ', config.url, config.baseURL)
|
|
|
return config;
|