Search in sources :

Example 1 with ECCResponse

use of com.tencentcloudapi.ecc.v20181213.models.ECCResponse in project tencentcloud-sdk-java by TencentCloud.

the class EccCorrect method main.

public static void main(String[] args) {
    try {
        Credential cred = new Credential("", "");
        HttpProfile httpProfile = new HttpProfile();
        httpProfile.setReqMethod("POST");
        httpProfile.setConnTimeout(60);
        httpProfile.setEndpoint("ecc.ap-beijing.tencentcloudapi.com");
        ClientProfile clientProfile = new ClientProfile();
        clientProfile.setUnsignedPayload(true);
        clientProfile.setHttpProfile(httpProfile);
        EccClient client = new EccClient(cred, "", clientProfile);
        ECCRequest req = new ECCRequest();
        final String content = "this composition content";
        req.setContent(content);
        ECCResponse res = client.ECC(req);
        System.out.println(ECCResponse.toJsonString(res));
        System.out.println(res.getRequestId());
    } catch (TencentCloudSDKException e) {
        e.printStackTrace();
    }
}
Also used : ECCRequest(com.tencentcloudapi.ecc.v20181213.models.ECCRequest) ECCResponse(com.tencentcloudapi.ecc.v20181213.models.ECCResponse) Credential(com.tencentcloudapi.common.Credential) TencentCloudSDKException(com.tencentcloudapi.common.exception.TencentCloudSDKException) ClientProfile(com.tencentcloudapi.common.profile.ClientProfile) HttpProfile(com.tencentcloudapi.common.profile.HttpProfile) EccClient(com.tencentcloudapi.ecc.v20181213.EccClient)

Aggregations

Credential (com.tencentcloudapi.common.Credential)1 TencentCloudSDKException (com.tencentcloudapi.common.exception.TencentCloudSDKException)1 ClientProfile (com.tencentcloudapi.common.profile.ClientProfile)1 HttpProfile (com.tencentcloudapi.common.profile.HttpProfile)1 EccClient (com.tencentcloudapi.ecc.v20181213.EccClient)1 ECCRequest (com.tencentcloudapi.ecc.v20181213.models.ECCRequest)1 ECCResponse (com.tencentcloudapi.ecc.v20181213.models.ECCResponse)1