A standalone AJAX library using JavaScript promises.
Download the latest aias release and load using a script tag:
<script src="dist/aias.min.js"></script>
or install with npm:
npm install aias
or install with bower:
bower install aias
aias.get(url)
aias.get('/endpoint')
.then(function (res, req) {
console.log(res);
});
aias.post(url[, data])
aias.post('/endpoint', {"name": "Bill", "age": 64})
.then(function (res, req) {
console.log(res);
});
aias.put(url[, data])
aias.put('/endpoint', {"name": "Bill", "age": 64})
.then(function (res, req) {
console.log(res);
});
aias.delete(url)
aias.delete('/endpoint')
.then(function (res, req) {
console.log(res);
});
1.1.2: Adding JSDoc-style comments.
1.1.1: Updating documentation.
1.1.0: Adding request to output.
1.0.3: Fixing bug with missing var statement.
1.0.2: Updating minification output to aias.min.js.
1.0.1: Updating documentation.
1.0.0: Initial release.
This is free software distributed under the MIT License.