How can I do an X-HTTP-Method-Override for an ajax request in jQuery?
You could set custom headers when performing an ajax request by using the beforeSend callback:
$.ajax({
beforeSend: function(xhr) {
xhr.setRequestHeader('X-HTTP-Method-Override', 'PUT');
},
type: 'POST',
url: '/someurl',
success: function(data){
// do something...
}
});