From 544ffd5372e5ab608b3279a945bc01e64745c4d0 Mon Sep 17 00:00:00 2001 From: "yadong.zhang" Date: Wed, 22 Sep 2021 17:47:12 +0800 Subject: [PATCH] =?UTF-8?q?:hankey:=20=E4=BF=AE=E5=A4=8Ds=E4=B8=80?= =?UTF-8?q?=E6=A0=B7=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/me/zhyd/oauth/request/AuthFeishuRequest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/me/zhyd/oauth/request/AuthFeishuRequest.java b/src/main/java/me/zhyd/oauth/request/AuthFeishuRequest.java index de8309f..88f5b50 100644 --- a/src/main/java/me/zhyd/oauth/request/AuthFeishuRequest.java +++ b/src/main/java/me/zhyd/oauth/request/AuthFeishuRequest.java @@ -56,7 +56,7 @@ public class AuthFeishuRequest extends AuthDefaultRequest { requestObject.put("app_id", config.getClientId()); requestObject.put("app_secret", config.getClientSecret()); String response = new HttpUtils(config.getHttpConfig()).post(url, requestObject.toJSONString(), new HttpHeader() - .add("Content-Type", "application/json")); + .add("Content-Type", "application/json")).getBody(); JSONObject jsonObject = JSON.parseObject(response); this.checkResponse(jsonObject); String appAccessToken = jsonObject.getString("app_access_token"); @@ -80,7 +80,7 @@ public class AuthFeishuRequest extends AuthDefaultRequest { String accessToken = authToken.getAccessToken(); String response = new HttpUtils(config.getHttpConfig()).get(source.userInfo(), null, new HttpHeader() .add("Content-Type", "application/json") - .add("Authorization", "Bearer " + accessToken), false); + .add("Authorization", "Bearer " + accessToken), false).getBody(); JSONObject object = JSON.parseObject(response); this.checkResponse(object); JSONObject data = object.getJSONObject("data"); @@ -112,7 +112,7 @@ public class AuthFeishuRequest extends AuthDefaultRequest { private AuthToken getToken(JSONObject param, String url) { String response = new HttpUtils(config.getHttpConfig()).post(url, param.toJSONString(), new HttpHeader() - .add("Content-Type", "application/json")); + .add("Content-Type", "application/json")).getBody(); JSONObject jsonObject = JSON.parseObject(response); this.checkResponse(jsonObject); JSONObject data = jsonObject.getJSONObject("data"); -- GitLab