1.7.1/1.8 REST CORS using PUT

Hey all,

I’m playing with the idea of an AngularJS app using the REST API and I’m having an issue, getting CORS errors with PUT requests. I’ve seen a couple issues like this posted on different platforms but can’t seem to sort this out.

$http({
    			
        method: 'PUT',
    	url: $scope.item.item.link + '/state', //(http://**URL**/rest/items/**ITEM**/state)
    	data: "OFF",
    	headers: {
    	    "Content-Type": "text/plain"
    	}
});

Thanks in advance!

Hi Chris,

try using the POST method instead the PUT. I also had the problem and POST method was the work-around for me.

Regards,
Michel