Registry / devops / feathers-fetch-service

feathers-fetch-service

JSON →
library1.0.0-beta.5jsnpmunverified

Feathers Fetch Service is a client-side service adapter for FeathersJS that uses the Fetch API to communicate with REST endpoints. The current version is 1.0.0-beta.5, released as a beta. It provides a simple interface for performing CRUD operations (find, get, create, update, patch, remove) via HTTP requests. Unlike the core Feathers REST client (@feathersjs/rest-client), this package is unmaintained and offers limited customization. It is suitable for quick prototyping but not recommended for production.

npm install feathers-fetch-service
INSTALL
IMPORT
SIG · FEATHERS-FETCH-SER
F
feathers-fetch-service
devopsjavascriptv1.0.0-beta.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FetchService
import FetchService from 'feathers-fetch-service'
const FetchService = require('feathers-fetch-service')
The package only exports a default export. CommonJS require works but may fail in strict ESM environments.
FetchService
import FetchService from 'feathers-fetch-service'
import { FetchService } from 'feathers-fetch-service'
Named import is not supported; only default export exists.

Shows how to instantiate FetchService with a base URL and perform a find query with pagination options.

import FetchService from 'feathers-fetch-service'; const notificationsService = new FetchService({ name: '', options: {}, base: 'http://notification.dev.awesome-app.com', }); async function getNotifications(limit = 5, skip) { const query = { $limit: limit, $sort: { createdAt: -1 } }; if (skip) query.$skip = skip; const data = await notificationsService.find({ query }); return data; } getNotifications().then(console.log).catch(console.error);
Debug
Known issues
breakingBreakage with Feathers v5 (Dove): The service interface changed; this package may not work with Feathers v5.
fix
Use @feathersjs/rest-client instead.
affects: >=5.0.0
deprecatedPackage is in beta and unmaintained since 2020.
fix
Migrate to @feathersjs/rest-client.
affects: >=1.0.0-beta.0
gotchaNo TypeScript definitions provided; must create custom declarations.
fix
Add a .d.ts file or use @feathersjs/rest-client which includes types.
affects: *
Errors
Common errors & fixes
Cannot find module 'feathers-fetch-service'
Package not installed or missing from node_modules.
fix
Run 'npm install feathers-fetch-service' in your project directory.
Upgrade
Version history
1.0.0-beta.5latest on npm
Audit
Dependencies
feathers-fetch-serviceoptionalThe package is no longer maintained; consider using @feathersjs/rest-client instead.
Agent activity
6 hits · last 30 days
node
6
Resources
feathers-fetch-service — npm install feathers-fetch-service · libregistry