Skip to content

Commit 2379089

Browse files
committed
fixes #304
1 parent 4c7a73d commit 2379089

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

lib/axiosInstance.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
const axios = require('axios').default;
22

3-
const axiosInstance = axios.create();
3+
// Add workaround for axios formdata issue
4+
// Added transformRequest based on on issue resolution suggestion here:
5+
// https://github.com/axios/axios/issues/5986#issuecomment-2029933275
6+
const axiosInstance = axios.create({
7+
transformRequest: [(data) => data,
8+
]
9+
});
410

511
module.exports = axiosInstance;

package-lock.json

Lines changed: 10 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"author": "[email protected]",
2121
"license": "Apache-2.0",
2222
"dependencies": {
23-
"axios": "1.6",
23+
"axios": "^1.7.2",
2424
"follow-redirects": "^1.14.8",
2525
"form-data": "^4.0.0",
2626
"jest": "^29.1.2",

0 commit comments

Comments
 (0)