Doing an ajax get request works as expected using the following code
$K.ajax({
type: "GET",
contentType: "application/json",
url: "http://someObscureURLThatIWontBeSharing/database/document",
dataType: "jsonp",
success: function(msg) {
console.log(msg);
},
error: function(a,b,c) {
console.log(a);
console.log(b);
console.log(c);
}
});
But a PUT ajax call using the following code
$K.ajax({
type: "PUT",
contentType: "application/json",
url: "http://someObscureURLThatIWontBeSharing/test/mrmer1",
dataType: "jsonp",
data: {"name":"mike"},
success: function(msg) {
console.log(msg);
},
error: function(a,b,c) {
console.log("XMLHttpRequest: " + a);
console.log("textStatus: " + b);
console.log("errorThrown: " + c);
}
});
results in the following console output
XMLHttpRequest: [object XMLHttpRequest]
textStatus: null
errorThrown: [Exception... "Access to restricted URI denied" code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)" location: "http://static.kobj.net/kobj-static-20100219162227.js Line: 371"]
I have been pulling my hair out trying to figure out why my ajax call wasn't working and finally output the previous to the console. I'm thinking there is something in the runtime that is blocking my request. Please help me out before I look like this

