Browse Source

//update log

release_toaliyun_real
xhxu 4 years ago
parent
commit
442ba84af3
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      mallinkService/src/main/java/com/iformall/douyin/web/api/TtWebGetRequestExecutor.java

+ 5
- 0
mallinkService/src/main/java/com/iformall/douyin/web/api/TtWebGetRequestExecutor.java View File

@@ -2,6 +2,7 @@ package com.iformall.douyin.web.api;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.WxType;
import me.chanjar.weixin.common.error.WxError;
import me.chanjar.weixin.common.error.WxErrorException;
@@ -26,6 +27,7 @@ import java.util.regex.Pattern;
* @author ecoolper
* @date 2017/5/4
*/
@Slf4j
public class TtWebGetRequestExecutor implements RequestExecutor<String, String> {
protected RequestHttp<CloseableHttpClient, HttpHost> requestHttp;

@@ -40,6 +42,8 @@ public class TtWebGetRequestExecutor implements RequestExecutor<String, String>

@Override
public String execute(String uri, String queryParam, WxType wxType) throws WxErrorException, IOException {
log.info("uri{}"+uri);
log.info("request{}"+queryParam);
String access_token = handleUrl(uri);
if(StringUtils.isBlank(access_token)){
WxError wxError = WxError.fromJson("{\n" +
@@ -66,6 +70,7 @@ public class TtWebGetRequestExecutor implements RequestExecutor<String, String>

try (CloseableHttpResponse response = requestHttp.getRequestHttpClient().execute(httpGet)) {
String responseContent = Utf8ResponseHandler.INSTANCE.handleResponse(response);
log.info("response{}"+responseContent);
JSONObject jsonObject = JSON.parseObject(responseContent);
JSONObject data = jsonObject.getJSONObject("data");
WxError error = WxError.fromJson(data.toJSONString());


Loading…
Cancel
Save