From 4f859737aeae6fd097f3ac1b52d0e456f838ebbe Mon Sep 17 00:00:00 2001 From: alan Date: Thu, 26 Sep 2019 09:42:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=97=A0jira=E4=BB=BB=E5=8A=A1=EF=BC=8C?= =?UTF-8?q?=E5=85=A8=E9=83=A8=E4=BD=BF=E7=94=A8application/json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/crud/crud.service.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) 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', - }, }); }