nicklandgrebe / active-resource.js

ActiveResource.js - API resource relational mapping in JavaScript
https://active-resource.js.org
MIT License
133 stars 20 forks source link

Allow custom definition of request adapter #15

Open nicklandgrebe opened 7 years ago

nicklandgrebe commented 7 years ago

Stories

Work

var resourceLibrary = ActiveResource.createResourceLibrary(
  'https://api.example.com/v1',
  {
    requestAdapter: function(method, url, data, headers) {
      return promiseLibrary([do something with these 4 args]);
    };
  }
);