Start a new topic

Method PUT is not allowed by Access-Control-Allow-Methods.

Hi,

I'm using Kinvey on angular JS, i try to save a new entity, i am loged, and i get this error : Method PUT is not allowed by Access-Control-Allow-Methods.



var promise = $kinvey.DataStore.save('events', {

_id: '',

name: "hello,

date: "datedate",

info: "wwww",

time: "qqqq"

}, {

success: function(response) {

console.log(response);

},

error: function(error) {

console.log(error);

}

});



what does it means ?

thanks ! so stupid error ...
Remove the second line in your code sample (the _id) and it should work. When you are creating new records, either do not include _id or set it to null. The code you have right now is actually attempting to update an existing record that doesn't exist, which is why you receive an error.
Login or Signup to post a comment