我正在尝试使用 Jquery 向名为 Cloudsight 的图像识别 API 发出 Ajax POST 请求。到目前为止,我的代码是:
$.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(错误请求)我做错了什么?据我所见,代码似乎没问题...