AjaxRequest
Minimalist AJAX request module with zero dependencies.
Usage
Include the module.
// AMDvar AjaxRequest = ; // CommonJSvar AjaxRequest = ;
Parameters.
var ajaxRequest = new AjaxRequest(
method, // String - required [GET, POST]
url, // String - required
async, // Boolean - optional
callback // Function - optional
);
Hypothetical usage example.
var ajaxRequest = 'GET' 'http://www.site.com/data.json' true; ajaxRequest;