parent
8c7c439c4e
commit
4eabd24c49
|
@ -54,8 +54,8 @@ public class ApiService {
|
|||
try {
|
||||
// 发送请求
|
||||
Request request = buildRequest(urlString);
|
||||
logger.info("getBIPToken → 获取返回数据:{}", request);
|
||||
Response response = client.newCall(request).execute();
|
||||
logger.info("getBIPToken → 获取返回数据:{}", response);
|
||||
token = handleResponse(response);
|
||||
} catch (Exception e) {
|
||||
logger.error("getBIPToken → 请求失败: ", e);
|
||||
|
@ -76,7 +76,7 @@ public class ApiService {
|
|||
|
||||
private static String handleResponse(Response response) throws IOException {
|
||||
if (response.isSuccessful()) {
|
||||
String responseBody = response.body().toString();
|
||||
String responseBody = response.body().string();
|
||||
logger.info("handleResponse → 响应内容: {}", responseBody);
|
||||
JSONObject jsonObject = JSONObject.parseObject(responseBody);
|
||||
JSONObject data = jsonObject.getJSONObject("data");
|
||||
|
|
Loading…
Reference in New Issue