From 847824497484a549a14839400319bbb4b01e067d Mon Sep 17 00:00:00 2001 From: alan Date: Wed, 25 Sep 2019 16:35:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20BI-51874=20=E4=BF=AE=E5=A4=8Dhttp?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E6=97=B6=E4=B8=AD=E6=96=87=E5=9C=A8ie?= =?UTF-8?q?=E4=B8=8B=E4=B9=B1=E7=A0=81=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/crud/crud.service.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/modules/crud/crud.service.ts b/src/modules/crud/crud.service.ts index 5c54fbe..7397b1b 100644 --- a/src/modules/crud/crud.service.ts +++ b/src/modules/crud/crud.service.ts @@ -76,6 +76,9 @@ export function requestGet(url: string, data?: any, params: CrudParams = {}) { type: 'GET', data, params, + headers: { + 'Content-Type': 'application/json;charset=UTF-8', + }, }); } @@ -85,6 +88,9 @@ export function requestPost(url: string, data = {}, params: CrudParams = {}) { type: 'POST', data, params, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', + }, }); } @@ -93,6 +99,9 @@ export function requestDelete(url: string, data = {}) { url, type: 'DELETE', data, + headers: { + 'Content-Type': 'application/json;charset=UTF-8', + }, }); } @@ -102,5 +111,8 @@ export function requestPut(url: string, data = {}, params: CrudParams = {}) { type: 'PUT', data, params, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', + }, }); }