使用Unity开发,调人体分析--手势识别的api,提示
WebException: Error writing request: The authentication or decryption has failed.
System.Net.WebConnectionStream.WriteHeaders ()
System.Net.WebConnectionStream.SetHeaders (System.Byte[] buffer)
(wrapper remoting-invoke-with-check) System.Net.WebConnectionStream:SetHeaders (byte[])
System.Net.HttpWebRequest.SendRequestHeaders (Boolean propagate_error)
各位遇到过么。
在start里调下面方法就会报错。
public void GestureDemo() {
var APP_ID = "XXXX";
var API_KEY = "XXXXXXXXX";
var SECRET_KEY = "XXXXXXXXXXXXXX";
var client = new Baidu.Aip.BodyAnalysis.Body(API_KEY, SECRET_KEY);
client.Timeout = 60000; // 修改超时时间
var image = File.ReadAllBytes(Application.streamingAssetsPath+"/h3.jpg");
JObject result = client.Gesture(image);
Debug.Log (result);
}
请问您解决了吗?是如何解决的呢
client.Timeout = 60000; // 修改超时时间 这去掉。不建议测试设置超时时间属性。