Ajax

A simple library for firing promise-based 'ajax' requests (useful when interacting with REST APIs).
https://github.com/FuzzyWuzzie/haxe-Ajax

To install, run:

haxelib install Ajax 1.1.0 

See using Haxelib in Haxelib documentation for more information.

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.

Contributors
FuzzyWuzzie
Version
1.1.0
Published
2 years ago
License
MIT

All libraries are free

Every month, more than thousand developers use haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on Github!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on Github