Sign Up for Free

RunKit +

Try any Node.js package right in your browser

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:

var restClient = require("@feathersjs/rest-client")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@feathersjs/rest-client v1.4.7

REST client services for different Ajax libraries

@feathersjs/rest-client

Build Status Dependency Status Download Status

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.

Installation

npm install @feathersjs/rest-client --save

Quick example

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');

Documentation

Please refer to the @feathersjs/rest-client documentation for more details.

License

Copyright (c) 2018

Licensed under the MIT license.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free