Reputation: 4288
I am trying out Iris Couch and I ma having problems posting cross domain. I am posting some simple JSON from within a chrome extension to Iris' couchdb and I get the dreaded 405 (Method Not Allowed)
I have turned CORS on in the CouchDB config, as well as set CORS credentials TRUE
This is my JS code
_save = function (item) {
var rtrn = $.Deferred();
$.ajax({
type: "POST",
url: 'https://xxxxx.iriscouch.com/notes',
dataType: 'json',
contentType: 'application/json',
data: JSON.stringify(item),
xhrFields: {
withCredentials: true
},
crossDomain: true,
success: function (e) {
rtrn.resolve();
console.log(e);
},
success: function (e) {
console.log(e);
}
});
return rtrn.promise();
}
Thank you!
Upvotes: 1
Views: 255