Important: The code for this module has been moved into the main Feathers repository at feathersjs/feathers (package direct link). Please open issues and pull requests there. No changes in your existing Feathers applications are necessary.
REST client services for different Ajax libraries
@feathersjs/rest-client supports REST server connectivity using jQuery, request, Superagent, Axios, Fetch or Angular HTTP as the AJAX library.
npm install @feathersjs/rest-client --save
const feathers = require('@feathersjs/feathers'); const rest = require('@feathersjs/rest-client'); const app = feathers(); // Connect to the same as the browser URL (only in the browser) const restClient = rest(); // Connect to a different URL const restClient = rest('http://feathers-api.com') // Configure an AJAX library (see below) with that client app.configure(restClient.fetch(window.fetch)); // Connect to the `http://feathers-api.com/messages` service const messages = app.service('messages');
Please refer to the @feathersjs/rest-client documentation for more details.
Copyright (c) 2018
Licensed under the MIT license.