Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/honza/ajax.js

Super simple ajax utility
https://github.com/honza/ajax.js

Last synced: about 5 hours ago
JSON representation

Super simple ajax utility

Awesome Lists containing this project

README

        

ajax.js
=======

ajax.js is a super-simple, 1kb, wait for it, ajax utility.

### Size

* Source: 2.3kb
* Minified: 1kb
* Gzipped: 628 bytes

### Usage

The API is very similar to that of jQuery's ajax method. You should
immediately feel at home.

ajax({
type: 'get',
url: 'http://example.com',
data: {name: 'John Smith'},
timeout: 5000,
onSuccess: function(data) {
console.log('Here is the data: ' + data);
},
onComplete: function() {

},
onError: function() {

}
});