EasyUI Forum
October 15, 2025, 04:16:36 PM *
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 10425 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: 2300


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!