I am able to perform GET, POST, DELETE ajax requests but i get a 500 internal server error when executing a PUT request
$.ajax({
type: “PUT”,
crossDomain: true,
url: ‘/api/resource/Feed Stock/FS00002’,
headers: {“X-Frappe-CSRF-Token”:p_token},
data: {“data”: JSON.stringify({“total_cost”:1500})}, //stringify JSON object.
success: function(resp)
{
notification = ‘Total Cost has been updated’
setTimeout(Notify(notification, ‘success’), 36000)
location.reload()
},
error: function(err){
console.log(err.statusText)
Notify(err.statusText, ‘danger’)
}
});