首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >身份证OCR一直FailedOperation.DownLoadError?

身份证OCR一直FailedOperation.DownLoadError?

提问于 2019-06-13 22:29:53
回答 0关注 0查看 982

try

{

Credential cred = new Credential

{

SecretId = "",

SecretKey = ""

};

ClientProfile clientProfile = new ClientProfile();

HttpProfile httpProfile = new HttpProfile();

httpProfile.Endpoint = ("ocr.tencentcloudapi.com");

clientProfile.HttpProfile = httpProfile;

OcrClient client = new OcrClient(cred, "ap-guangzhou", clientProfile);

IDCardOCRRequest req = new IDCardOCRRequest();

string strParams = "{\"ImageUrl\":\"D:\\\\Gitee\\\\C#\\\\Property Management System\\\\PMS\\\\PMS\\\\bin\\\\Debug\\\\PersonImguserImage.jpg\",\"CardSide\":\"FRONT\"}";

req = IDCardOCRRequest.FromJsonString<IDCardOCRRequest>(strParams);

IDCardOCRResponse resp = client.IDCardOCR(req).

ConfigureAwait(false).GetAwaiter().GetResult();

Console.WriteLine(AbstractModel.ToJsonString(resp));

}

catch (Exception e)

{

Console.WriteLine(e.ToString());

}

Console.Read();

请这段代码为什么出错啊

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档