https://github.com/honza/ajax.js
Super simple ajax utility
https://github.com/honza/ajax.js
Last synced: 3 months ago
JSON representation
Super simple ajax utility
- Host: GitHub
- URL: https://github.com/honza/ajax.js
- Owner: honza
- License: other
- Created: 2011-06-03T19:36:53.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2013-09-17T16:53:31.000Z (almost 12 years ago)
- Last Synced: 2025-03-25T13:04:24.607Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 97.7 KB
- Stars: 14
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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() {}
});