我为人脸检测认知服务 api 创建了一个单独的资源,它提供了如下端点,
https://southcentralus.api.cognitive.microsoft.com/face/v1.0
所以在提出如下要求时,
var byteContent = new ByteArrayContent(fileContents);
byteContent.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
var response = await _client.PostAsync("detect?returnFaceId=true&returnFaceAttributes=age,gender,smile,facialHair,glasses,headPose,emotion,hair,makeup,occlusion,accessories,blur,exposure,noise", byteContent);
var responseJson = await response.Content.ReadAsStringAsync();
它抛出一个错误说,
未找到资源