diff --git a/src/modules/crud/crud.service.ts b/src/modules/crud/crud.service.ts index 7397b1b..aebbf3f 100644 --- a/src/modules/crud/crud.service.ts +++ b/src/modules/crud/crud.service.ts @@ -51,6 +51,7 @@ export async function request(reqOptions: CrudReqOpts = {}): Promise ...defaultHeaders, ...headers, Authorization: `Bearer ${getCookieByName('fine_auth_token')}`, + 'Content-Type': 'application/json;charset=UTF-8', }, params, paramsSerializer, @@ -76,9 +77,6 @@ export function requestGet(url: string, data?: any, params: CrudParams = {}) { type: 'GET', data, params, - headers: { - 'Content-Type': 'application/json;charset=UTF-8', - }, }); } @@ -88,9 +86,6 @@ export function requestPost(url: string, data = {}, params: CrudParams = {}) { type: 'POST', data, params, - headers: { - 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', - }, }); } @@ -99,9 +94,6 @@ export function requestDelete(url: string, data = {}) { url, type: 'DELETE', data, - headers: { - 'Content-Type': 'application/json;charset=UTF-8', - }, }); } @@ -111,8 +103,5 @@ export function requestPut(url: string, data = {}, params: CrudParams = {}) { type: 'PUT', data, params, - headers: { - 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', - }, }); }