This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
@feathersjs/rest-client with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
REST client services for different Ajax libraries
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.