我正在尝试使用Jquery向一个名为Cloudsight的图像识别API发出一个Ajax POST请求。到目前为止,我的代码是:Jquery Ajax API错误:400错误请求
$.ajax({
type: "POST",
url: "http://api.cloudsightapi.com/image_requests",
Authorization: "CloudSight [key]",
data: {
remote_image_url: "https://www.google.co.uk/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png",
locale: "en-US"
},
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
当我尝试运行它,我得到的错误:400(无效请求),我在做什么错?据我所看到的代码似乎是好的...
我得到了:{{error:“收到非OAuth请求”} – Hackerman
您是否使用cloudscape API文档进行过验证,提供了所有必要的字段?我似乎无法访问它,所以我不能确定我自己。 – hughjidette
该网址可能存在问题。 – Aditya