Ajax
.ajax(options)
A ajax can be created by using following codes.
You can create an ajax request by using following code.
$.ajax({
url: URL,
type: 'GET', // POST or GET
success: function(response){
console.log(response);
},
error: function(error){
console.log(error);
}
});
$.ajax({
url: URL,
type: 'GET' // POST or GET
})
.then(function(response) {
console.log(response);
})
.catch(function(error) {
console.log(error);
});