0
这里是我的代码使用Microsoft脸API的对象返回400图片无效或参数无效
<script type="text/javascript">
$(function() {
var params = {
// Request parameters
"returnFaceId": "true",
"returnFaceLandmarks": "false",
"returnFaceAttributes": "{string}",
};
$.ajax({
url: "https://westus.api.cognitive.microsoft.com/face/v1.0/detect?" + $.param(params),
beforeSend: function(xhrObj){
// Request headers
xhrObj.setRequestHeader("Content-Type","application/json");
xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","8b99a9ed839a40a08aa8b529ef0f9b8c");
},
type: "POST",
// Request body
data: '{ "url": "http://heightline.com/wp-content/uploads/Tom-Cruise-smile.jpg" }'
})
.done(function(data) {
alert("success");
})
.fail(function() {
alert("error");
});
});
这里是那里有文档的图像从server`enter时约400性反应我进入或访问页面然后它会显示错误的帮助如何解决这个
不过400错误的性反应 –
请张贴代码,我用你确切的代码与我的变化和它的作品..没有在结尾忘记逗号? – bukajcihaj
在上面的代码我改变字符串与年龄 –