Skip to content

Commit

Permalink
feat: add headers
Browse files Browse the repository at this point in the history
  • Loading branch information
MICHEL NOGALES authored and MICHEL NOGALES committed Sep 8, 2023
1 parent 6e3414f commit fe8acf1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/UploadFile/FileService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const downloadFile = ({ response, fileName = '' }) => {
};

const headersDefaultTransfer = () => ({
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
});

Expand Down Expand Up @@ -94,9 +95,8 @@ const httpTransfer = axios.create({
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
// @ts-ignore
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
// 'Content-Type': 'application/json',
// 'X-Requested-With': 'XMLHttpRequest',
});
httpTransfer.defaults.headers.post['Content-Type'] = 'application/json';
httpTransfer.defaults.headers.common = headersDefaultTransfer();
Expand Down

0 comments on commit fe8acf1

Please sign in to comment.