|
|
@@ -39,7 +39,7 @@ public class OceanEngineApiClient extends AbstractApiClient implements IAccessTo
|
|
|
/**
|
|
|
* 获取Access Token
|
|
|
*/
|
|
|
- private static final String ACCESS_TOKEN_URL = "https://api.oceanengine.com/open_api/oauth2/access_token";
|
|
|
+ private static final String ACCESS_TOKEN_URL = "https://api.oceanengine.com/open_api/oauth2/access_token/";
|
|
|
/**
|
|
|
* 刷新 Token
|
|
|
*/
|
|
|
@@ -163,9 +163,11 @@ public class OceanEngineApiClient extends AbstractApiClient implements IAccessTo
|
|
|
map.put("auth_code", request.getAuthCode());
|
|
|
HttpResponse response = HttpRequest.post(ACCESS_TOKEN_URL)
|
|
|
.header("Content-Type", "application/json")
|
|
|
- .form(JSONUtil.toJsonStr(map))
|
|
|
+ .body(JSONUtil.toJsonStr(map))
|
|
|
.timeout(SystemConstant.API_TIMEOUT)
|
|
|
.execute();
|
|
|
+ String body = response.body();
|
|
|
+ log.info("巨量获取token数据{}", body);
|
|
|
JSONObject res = new JSONObject(response.body());
|
|
|
int code = (int) res.get("code");
|
|
|
if (code == 0) {
|