$.get()
Shorthand to make AJAX requests using the GET method.
Usage
$.get(url[, data, success, type]); // => xhr
$.get(url, success[, type]); // => xhr
See $.ajax() for a description of the input parameters.
Return value
For asynchronous requests, the generated XMLHttpRequest object will be returned. Synchronous requests will return undefined.
Example
The following example makes an AJAX request using the GET method:
$.get(
"/api.php",
{action: "update", id: 5},
function (response) {
console.log(response);
},
"json"
);
Differences to jQuery
Dabby doesn’t return a deferred object like jQuery does, so you cannot chain any deferred methods to this method.
$.post()
Shorthand to make AJAX requests using the POST method.
Usage
$.post(url[, data, success, type]) // => xhr
$.post(url, success[, type]) // => xhr
See $.ajax() for a description of the input parameters.
Return value
For asynchronous requests, the generated XMLHttpRequest object will be returned. Synchronous requests will return undefined.
Example
The following example makes an AJAX request using the POST method:
$.post(
"/api.php",
{action: "update", id: 5},
function (response) {
console.log(response);
},
"json"
);
Differences to jQuery
Dabby doesn’t return a deferred object like jQuery does, so you cannot chain any deferred methods to this method.