The jQuery ajax method is great and powerful, it can handle everything as needed.
There are various methods in jquery to make AJAX calls according to your requirements, but they are all synonymous with the ajax jquery method.
for json you can use $.getJSON(url,[data],function(response){});
to place data that you can use `$ .post (URL, [Data], function (response) {});
to receive the request, you can use `$ .get (URL, [Data], function () {});
and if you want to use the ajax method for all these things, you need to pass different arguments as per your requirement
$.ajax({ 'url':you url, 'type':request type, 'data':your data, 'success':success handler function, 'error':error handler function, /*and many more*/ )}
read jquery documentation for full details
source share