From 8d13c10d9783263905afba32aa130ee14dd5eb77 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Fri, 1 Jul 2022 17:43:29 +0800 Subject: [PATCH] =?UTF-8?q?fix(API):=20=E5=8E=BB=E6=8E=89=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=20http=20client=20=E8=AF=B7=E6=B1=82=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/commons/utils/HttpClientUtil.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/backend/src/main/java/io/dataease/commons/utils/HttpClientUtil.java b/backend/src/main/java/io/dataease/commons/utils/HttpClientUtil.java index fb71455a64..70565fed75 100755 --- a/backend/src/main/java/io/dataease/commons/utils/HttpClientUtil.java +++ b/backend/src/main/java/io/dataease/commons/utils/HttpClientUtil.java @@ -86,9 +86,6 @@ public class HttpClientUtil { for (String key : header.keySet()) { httpGet.addHeader(key, header.get(key)); } - - httpGet.addHeader(HTTP.CONTENT_ENCODING, config.getCharset()); - HttpResponse response = httpClient.execute(httpGet); return getResponseStr(response, config); } catch (Exception e) { @@ -124,9 +121,6 @@ public class HttpClientUtil { for (String key : header.keySet()) { httpPost.addHeader(key, header.get(key)); } - httpPost.addHeader(HTTP.CONTENT_TYPE, "application/json"); - httpPost.addHeader(HTTP.CONTENT_ENCODING, config.getCharset()); - EntityBuilder entityBuilder = EntityBuilder.create(); entityBuilder.setText(json); entityBuilder.setContentType(ContentType.APPLICATION_JSON); @@ -180,8 +174,6 @@ public class HttpClientUtil { for (String key : header.keySet()) { httpPost.addHeader(key, header.get(key)); } - httpPost.addHeader(HTTP.CONTENT_ENCODING, config.getCharset()); - if (body != null && body.size() > 0) { List nvps = new ArrayList<>(); for (String key : body.keySet()) {