收藏
回答

C# 调用https://api.weixin.qq.com/cv/ocr/返errcode:410

HttpWebRequest request = (HttpWebRequest)WebRequest.Create(@"https://api.weixin.qq.com/cv/ocr/comm?access_token=" + getAccessToken());

request.Method = "post";

request.ContentType = "multipart/form-data";

byte[] datas = File.ReadAllBytes(@imgPath);

request.ContentLength = datas.Length;

Stream stream = request.GetRequestStream();

stream.Write(datas, 0, datas.Length);

stream.Close();

try {

HttpWebResponse response = (HttpWebResponse)request.GetResponse();

StreamReader myStreamReader = new StreamReader(response.GetResponseStream(), Encoding.UTF8);

string retString = myStreamReader.ReadToEnd();

Debug.WriteLine(retString);

return null;

} catch {

Debug.WriteLine("失败");

return null;

}

返回是:{"errcode":41005,"errmsg":"media data missing hint: [Jceyla0861w783] rid: 641c203d-7e15e206-523ae08c"}

这是什么情况呢?

回答关注问题邀请回答
收藏

1 个回答

  • 王很
    王很
    2023-06-17

    {"errcode":41005,"errmsg":"media data missing hint: [euKmIA0205w972] rid: 648cfc34-1302fb5b-5633b4eb"}

    2023-06-17
    有用
    回复
登录 后发表内容