405 - not allowed

Added by Andrea Sanchez 8 months ago

I need consult some information using an api rest in a costume theme, in the folder javascripts i had the function with jquery and i created a folder named lib with mi api rest but i always get a 405 not allowed. Where i need to put the api rest file or what it seems the problem?

Jquery code:

data = {
function:"loadAssignTo",
proveedor:proveedor

};

$.ajax( {
async:false,
contentType: "json",
type: 'POST',
dataType: 'json',
data:data,
url:'/themes/cfe/lib/ajaxcall.php',
success: function(data){
console.log(data);
},
error: function(resp,excep){
console.log(resp);
}
});