I am using Microsoft cognitive service face-api and I have done detecting face and I have got face ids. For detecting face, I used an image form online and add urls in request body of the rest api. Now for verifying faces, i used two images and I have two urls. So I got a problem with sending request body.I don't know which data should send in request body
$(function() {
var params = {
{
"faceId1": "c5c24a82-6845-4031-9d5d-978df9175426",
"faceId2": "815df99c-598f-4926-930a-a734b3fd651c"
}
};
$.ajax({
url: "https://westus.api.cognitive.microsoft.com/face/v1.0/verify?" + $.param(params),
beforeSend: function(xhrObj){
// Request headers
xhrObj.setRequestHeader("Content-Type","application/json");
xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","{subscription key}");
},
type: "POST",
// Request body
data:"{}";
})
.done(function(data) {
alert("success");
})
.fail(function(){
alert("error");
});
});