# feathers-rest

> The Feathers REST API provider

Latest version **1.8.1** (published 2017-10-31) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install feathers-rest
pnpm add feathers-rest
yarn add feathers-rest
bun add feathers-rest
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.8.1 |
| Published | 2017-10-31 |
| First published | 2016-01-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >= 4 |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 52 |
| Author | Feathers contributors |
| Maintainers | daffl, ekryski, marshallswain |
| Keywords | feathers, feathers-plugin |

## Links

- npm: https://www.npmjs.com/package/feathers-rest
- Repository: https://github.com/feathersjs-ecosystem/feathers-rest
- Issues: https://github.com/feathersjs-ecosystem/feathers-rest/issues
- npm.io page: https://npm.io/package/feathers-rest

## Dependencies (4)

- [qs](https://npm.io/package/qs.md) ^6.4.0
- [debug](https://npm.io/package/debug.md) ^3.0.0
- [feathers-errors](https://npm.io/package/feathers-errors.md) ^2.0.1
- [feathers-commons](https://npm.io/package/feathers-commons.md) ^0.8.0

## Alternatives

- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) — 2.2M weekly downloads
- [roboto-fontface](https://npm.io/package/roboto-fontface.md) — 196.0K weekly downloads
- [@react-native-vector-icons/common](https://npm.io/package/@react-native-vector-icons/common.md) — 150.4K weekly downloads
- [@procore/core-icons](https://npm.io/package/@procore/core-icons.md) — 4.6K weekly downloads
- [@react-md/material-icons](https://npm.io/package/@react-md/material-icons.md) — 1.6K weekly downloads

## Recent versions

- 1.8.1 (latest) — 2017-10-31
- 2.0.0-pre.1 (pre) — 2017-07-23
- 1.8.0 — 2017-07-04
- 1.7.4 — 2017-06-27
- 1.7.3 — 2017-06-07
- 1.7.2 — 2017-04-11
- 1.7.1 — 2017-03-02
- 1.7.0 — 2017-03-01
- 1.6.0 — 2016-12-31
- 1.5.3 — 2016-12-30
- 1.5.2 — 2016-11-08
- 1.5.1 — 2016-10-21
- 1.5.0 — 2016-09-09
- 1.4.4 — 2016-08-18
- 1.4.3 — 2016-07-14
- … 13 more at https://npm.io/package/feathers-rest/versions

## README

# feathers-rest

> _Important:_ For Feathers v3.0.0 and later, `feathers-rest` is has been replaced by framework specific adapters. Use `@feathersjs/express` and `@feathersjs/express/rest` provided in that module instead.

[![Greenkeeper badge](https://badges.greenkeeper.io/feathersjs-ecosystem/feathers-rest.svg)](https://greenkeeper.io/)

[![Build Status](https://travis-ci.org/feathersjs-ecosystem/feathers-rest.png?branch=master)](https://travis-ci.org/feathersjs-ecosystem/feathers-rest)
[![Code Climate](https://codeclimate.com/github/feathersjs-ecosystem/feathers-rest/badges/gpa.svg)](https://codeclimate.com/github/feathersjs-ecosystem/feathers-rest)
[![Test Coverage](https://codeclimate.com/github/feathersjs-ecosystem/feathers-rest/badges/coverage.svg)](https://codeclimate.com/github/feathersjs-ecosystem/feathers-rest/coverage)
[![Dependency Status](https://img.shields.io/david/feathersjs-ecosystem/feathers-rest.svg?style=flat-square)](https://david-dm.org/feathersjs-ecosystem/feathers-rest)
[![Download Status](https://img.shields.io/npm/dm/feathers-rest.svg?style=flat-square)](https://www.npmjs.com/package/feathers-rest)
[![Slack Status](http://slack.feathersjs.com/badge.svg)](http://slack.feathersjs.com)

> The Feathers REST API provider

## About

This provider exposes [Feathers](http://feathersjs.com) services through a RESTful API using [Express](http://expressjs.com) that can be used with Feathers 1.x and 2.x as well as client support for Fetch, jQuery, Request, Superagent, axios and angular2+'s HTTP Service.

__Note:__ For the full API documentation go to [https://docs.feathersjs.com/api/rest.html](https://docs.feathersjs.com/api/rest.html).

## Quick example

```js
import feathers from 'feathers';
import bodyParser from 'body-parser';
import rest from 'feathers-rest';

const app = feathers()
  .configure(rest())
  .use(bodyParser.json())
  .use(bodyParser.urlencoded({ extended: true }))
  .use(function(req, res, next) {
    req.feathers.data = 'Hello world';
    next();
  });

app.use('/:app/todos', {
  get: function(id, params) {
    console.log(params.data); // -> 'Hello world'
    console.log(params.app); // will be `my` for GET /my/todos/dishes

    return Promise.resolve({
      id,
      params,
      description: `You have to do ${name}!`
    });
  }
});
```

## Client use

```js
import feathers from 'feathers/client';
import rest from 'feathers-rest/client';

import jQuery from 'jquery';
import request from 'request';
import superagent from 'superagent';
import axios from 'axios';
import {Http, Headers} from '@angular/http';


const app = feathers()
  .configure(rest('http://baseUrl').jquery(jQuery))
  // or
  .configure(rest('http://baseUrl').fetch(window.fetch.bind(window)))
  // or
  .configure(rest('http://baseUrl').request(request))
  // or
  .configure(rest('http://baseUrl').superagent(superagent))
  // or
    .configure(rest('http://baseUrl').axios(axios))
  // or (using injected Http instance)
    .configure(rest('http://baseUrl').angular(http, { Headers }))
```

## License

Copyright (c) 2015

Licensed under the [MIT license](LICENSE).

---
_Source: https://npm.io/package/feathers-rest · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
