Is it possible to get all the defaults that are associcate with the $.ajax function.
So it would return something like this:
{
global:true,
headers:{},
ifModified:false,
type:"GET",
url:"the current page url",
etc....
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From looking at the source code, I believe the (current) defaults are found in
jQuery.ajaxSettings, of course also available as$.ajaxSettings. So if you haven’t changed them, you should be able to get them from there.Note that if you have changed them, for example using the
$.ajaxSetuputility method, you’ll get the new defaults you created, not the inherent ones from the jQuery library.Also looking at the source code, it seems the defaults are the following: