EasyUI Forum
July 19, 2025, 08:30:29 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Howto overryde ajax method from POST to PUT in form  (Read 3213 times)
Vladzimir
Newbie
*
Posts: 4


View Profile
« on: March 20, 2025, 02:15:07 AM »

Hi!
Howto overryde ajax method from POST to PUT in form submit methods?
Logged
jarry
Administrator
Hero Member
*****
Posts: 2294


View Profile Email
« Reply #1 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;
  }
});
Logged
Vladzimir
Newbie
*
Posts: 4


View Profile
« Reply #2 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!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!