I am trying to make an Ajax POST request to an image recognition API called Cloudsight using Jquery. So far my code is:
$.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>
When I try to run it I get the Error: 400 (Bad Request) What am I doing wrong? As far as I can see the code seems to be alright...
{error: "Non OAuth request received"}