@PostMapping("/describeVideoTask")
public Object DescribeVideoTask(
@RequestParam (name = "vodTaskId") String vodTaskId
) {
System.out.println("参数");
System.out.println(vodTaskId);
try{
Credential cred = new Credential("APPID", "SECRER");
HttpProfile httpProfile = new HttpProfile();
httpProfile.setEndpoint("ticm.tencentcloudapi.com");
ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile);
TicmClient client = new TicmClient(cred, "ap-beijing", clientProfile);
String params = "{\"VodTaskId\":\""+vodTaskId+"\"}";
System.out.println(params);
DescribeVideoTaskRequest req = DescribeVideoTaskRequest.fromJsonString(params, DescribeVideoTaskRequest.class);
System.out.println(req);
DescribeVideoTaskResponse resp = client.DescribeVideoTask(req);
System.out.println(DescribeVideoTaskResponse.toJsonString(resp));
return resp;
} catch (TencentCloudSDKException e) {
System.out.println(e.toString());
}
return null;
}
加上变量就不行,返回空值,而且状态是 status: "PROCESSING"
String params = "{\"VodTaskId\":\""+vodTaskId+"\"}";
把vodTaskId写死就返回正常,求大神指点
String params = "{\"VodTaskId\":\"1254418846-procedurev2-5c4568825e168676014e5f23f03a20b4t0\"}";
相似问题