Skip to content

Commit

Permalink
fixes #304
Browse files Browse the repository at this point in the history
  • Loading branch information
hoijnet committed Jul 20, 2024
1 parent 4c7a73d commit 2379089
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
8 changes: 7 additions & 1 deletion lib/axiosInstance.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
const axios = require('axios').default;

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

module.exports = axiosInstance;
19 changes: 10 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"author": "kevin@terminusdb.com",
"license": "Apache-2.0",
"dependencies": {
"axios": "1.6",
"axios": "^1.7.2",
"follow-redirects": "^1.14.8",
"form-data": "^4.0.0",
"jest": "^29.1.2",
Expand Down

0 comments on commit 2379089

Please sign in to comment.