Ajax 1.1.0

A simple library for firing promise-based 'ajax' requests (useful when interacting with REST APIs).

Released 2015-11-23.

To install, run:

haxelib install Ajax 1.1.0

See using Haxelib in Haxelib documentation for more information.

MaintainerFuzzyWuzzie
Websitehttps://github.com/FuzzyWuzzie/haxe-Ajax
Current version1.1.0
StatisticsInstalled 30 times
LicenseMIT
Tags js

README.md

haxe-Ajax

License

A simple library for firing promise-based 'ajax' requests (useful when interacting with REST APIs).

Examples

Loading Data

// fire the ajax request
// using GET, to /test
Ajax.request(
    HTTPMethod.GET,
    '/test'
).then(function(res:Response) {
    // alert the user of the response
    Browser.console.log(res.response);
}).catchError(function(err:Dynamic) {
    // if an error comes up, report it!
    Browser.console.error(err);
});

Live Sample

A live sample is available which loads data from the server asynchronously.