mech-ajax
Mechanisms which support asynchronous ajax calls without the need for fibers or promises.
See Mechanisms Home for more information and other libraries.
Supported Mechanisms
- ajax.get - Submits a get request to a server for a given
uri
.
Supported Mechanisms
ajax.get
ajax.get
makes an ajax GET request against a uri
. It works in conjunction with the core async
mechanism.
Traditionally, asynchronous callbacks are handled using a function:
var httpRequest = ; // or new ActiveXObject(...);var strURL = "http://www.example.org/some.file";// ...xmlHttpReq { console;}
With mechanisms and cell scoping:
m;mgo;
The result of the ajax.get
call is placed into cell A:1
. The value of that cell is then written to the console.
Setup
Using In Your Projects
Change directory to your node ajax.
$ npm install --save mech-ajax
Development
Get Involved!
There are a lot of core mechanisms just waiting to be created. Many of them can be created in a few hours including in-depth tests. Clone mech-library to get started!
Setup
Install:
$ npm install
Continuous test:
$ gulp
Test:
$ gulp webtests
Test Server
Read documentation in gulpfile.js to see how to setup automated web testing.
$ gulp webserver