As a developer, I may use (or be required to use) a promise library other than the heavy-duty jQuery.ajax, so I want to be able to customize my active-resourceresourceLibrary my promise library for processing async requests
Work
[ ] Add optional argument requestAdapter of type function when defining resourceLibrary
var resourceLibrary = ActiveResource.createResourceLibrary(
'https://api.example.com/v1',
{
requestAdapter: function(method, url, data, headers) {
return promiseLibrary([do something with these 4 args]);
};
}
);
[ ] Enable base adapter to use provided requestAdapter, or use default
[ ] Add a default request adapter that works with both browser and Node environments #8
Stories
jQuery.ajax
, so I want to be able to customize myactive-resource
resourceLibrary
my promise library for processing async requestsWork
requestAdapter
of typefunction
when definingresourceLibrary
requestAdapter
, or use default