EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Vladzimir on March 20, 2025, 02:15:07 AM



Title: Howto overryde ajax method from POST to PUT in form
Post by: Vladzimir on March 20, 2025, 02:15:07 AM
Hi!
Howto overryde ajax method from POST to PUT in form submit methods?


Title: Re: Howto overryde ajax method from POST to PUT in form
Post by: jarry on March 22, 2025, 06:42:05 PM
Call this code before submitting a form to override any ajax parameters.
Code:
$.ajaxSetup({
  beforeSend: function(xhr, settings) {
    settings.type = 'PUT';
    return true;
  }
});


Title: Re: Howto overryde ajax method from POST to PUT in form
Post by: Vladzimir on March 26, 2025, 07:05:22 AM
Call this code before submitting a form to override any ajax parameters.
Code:
$.ajaxSetup({
  beforeSend: function(xhr, settings) {
    settings.type = 'PUT';
    return true;
  }
});
Thanks for your help!