Retain REST webservice plugin
To start saving the Retain data in a REST webservice, simply inject the plugin into the Model.
var retain = ;var retainAjax = ;var Movies = ;Movies
npm install retain-http
If you want you use retain-http in the browser, there are 2 options:
If your bundler have implemented the
browser spec, just require the file using the
Otherwise, require the
lib/client.js file using the CJS signature
You can map the
retain-httpname to the
lib/client.jsfile using your
bundlermapping option, so you can require it using the default signature
Retain use Promises internally to transfer data between the plugins.
To create a plugin, it is necessary to implement each of the following Retain methods.
Each of theses methods must return a promise.
To run the tests in the server:
To run the tests in the browser:
Initialize the server where the data will be requested:
Initialize the server to see the tests outputs
localhost:4000/ in the browser.