我尝试通过使用 js 节点来使用 face api,但响应始终是 "statusCode": 404, "message": "Resource not found" 安装时我应该错过什么吗?
这是我的代码
const uriBase2 = 'https://myendpoint/face/v1.0/persongroups';
const params = {
'personGroupId': 'dava12345',
};
const options = {
uri: uriBase2,
qs: params,
method: 'PUT',
body: '{ "name": "group2", "userData": "user-provided data attached to ", "recognitionModel": "recognition_02" }',
headers: {
'Content-Type': 'application/json',
'Ocp-Apim-Subscription-Key' : 'mykey'
}
};
request(options, (error, response, body) => {
if (error) {
console.log('Error: ', error);
return;
}
let jsonResponse = JSON.stringify(JSON.parse(body), null, ' ');
console.log('JSON Response\n');
console.log(jsonResponse);
});



