在我测试时,预测 API一周前工作,但今天早上(2016 年 12 月 2 日)突然停止工作,出现以下错误:
{
"error": {
"code": "BadArgument",
"message": "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"
}
}
此调用的 API 参考在此处。
这是我正在使用的示例代码:
static void Main()
{
MakeRequest();
}
static async void MakeRequest()
{
var client = new HttpClient();
var queryString = HttpUtility.ParseQueryString(string.Empty);
client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "*****");
var uri = "https://api.projectoxford.ai/luis/v1.0/prog/apps/******/predict?" + queryString;
HttpResponseMessage response;
byte[] byteData = Encoding.UTF8.GetBytes("test.");
using (var content = new ByteArrayContent(byteData))
{
response = await client.PostAsync(uri, content);
}
}
这里有人有同样的问题吗?