yumeng 3 years ago
parent
commit
9850d08cda

+ 1 - 1
job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/data/service/impl/AdUnitReportServiceImpl.java

@@ -68,7 +68,6 @@ public class AdUnitReportServiceImpl implements IAdUnitReportService {
 
         Map<String, String> headers = new HashMap<>();
         headers.put("Access-Token", accessToken);
-        headers.put("Content-Type", "application/json");
         Map<String, Object> param = new HashMap<>();
         param.put("advertiser_id", advertiserId);
 
@@ -83,6 +82,7 @@ public class AdUnitReportServiceImpl implements IAdUnitReportService {
 
 
         String result = HttpUtils.httpPostRequest(postUrl + KuaishouConstant.AD_UNIT_LIST, param, headers);
+        System.err.println(result);
 
         JSONObject resultJson = JSONObject.parseObject(result);
         if (Check.isNull(resultJson)) {

+ 1 - 1
job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/data/utils/HttpUtils.java

@@ -86,7 +86,7 @@ public class HttpUtils {
         httppost.setEntity(new StringEntity(new Gson().toJson(param), Charset.forName("UTF-8")));
       }
       RequestConfig requestConfig =
-          RequestConfig.custom().setSocketTimeout(300 * 1000).setConnectTimeout(300 * 1000).build();
+          RequestConfig.custom().setSocketTimeout(120000).setConnectTimeout(120000).build();
       httppost.setConfig(requestConfig);
       HttpEntity respentity;