@luvio/network-adapter-composable
TypeScript icon, indicating that this package has built-in type declarations

0.156.5 • Public • Published

network-adapter-fetch

An implementation of the Luvio NetworkAdapter that allows for multiple NetworkAdapters in the same environment.

Install

npm i @luvio/network-adapter-composable

Usage

import { buildComposableNetworkAdapter } from '@luvio/network-adapter-composable';
import { composedJwtNetworkAdapter } from '@luvio/network-adapter-jwt';
import { fetchNetworkAdapter } from '@luvio/network-adapter-fetch';

const networkAdapter = buildComposableNetworkAdapter([
  composedJwtNetworkAdapter, // Ex: handle ResourceRequests that needs JWT authentication, leveraging on the baseUri
  {
    shouldHandleRequest: () => true, // default network adapter
    adapter: fetchNetworkAdapter,
  },
]);

const luvio = new Luvio(new Environment(new InMemoryStore(), networkAdapter));

Readme

Keywords

none

Package Sidebar

Install

npm i @luvio/network-adapter-composable

Weekly Downloads

102

Version

0.156.5

License

MIT

Unpacked Size

3.67 kB

Total Files

5

Last publish

Collaborators

  • jrodriguezvelasco
  • erin.shaw
  • karthick-sh
  • dme722
  • scarrawaysf
  • kevinv11n
  • mikeburr
  • apapko
  • ethan.chan
  • ciaran.hannigan
  • lwc-admin