HI i have used both the things in my experience i was thinking method and type both are POST and GET methods.
But seems like they are not similar.?
if i use type
it is working i am serializeing
a form data..
if i write method
it is not working can can anyone explain what is the diff between them..?
$.ajax({
url: "controller.php",
type: 'POST',
method: "POST",
dataType: "json",
});
help is appropriated.
type (default: 'GET') Type: String An alias for method. You should use type if you're using versions of jQuery prior to 1.9.0.
From: http://api.jquery.com/jquery.ajax/
method:
The HTTP method to use for the request (e.g. "POST", "GET", "PUT"). (version added: 1.9.0)
type:
An alias for method. You should use type if you're using versions of jQuery prior to 1.9.0.
both are same, in new version of jQuery type renamed to method
©2020 All rights reserved.