Skip to main content
The REST client allows you to connect to a Feathers API using HTTP/HTTPS. It supports three different HTTP libraries: fetch (recommended), axios, and superagent.

Installation

Browser Usage

In the browser, use the native fetch API:
1

Include the library

2

Create the application

3

Configure REST client

4

Use services

Node.js Usage

Service Methods

All standard Feathers service methods are available:

Custom Headers

You can pass custom headers with any service call:

Connection Options

You can pass connection-specific options using params.connection:

Custom Methods

REST client supports custom service methods:
Custom methods are sent as POST requests with a special X-Service-Method header indicating the method name.

Direct Service Usage

You can create service instances without configuring the app:

Error Handling

REST errors are automatically converted to Feathers errors:

Base URL and Service Paths

The REST client constructs URLs based on the base URL and service name:

TypeScript Support

The REST client has full TypeScript support:

Configuration Options

You can pass options when creating the REST client:

Next Steps

Socket.io Client

Learn about real-time connections with WebSocket support

Authentication

Add authentication to your client application