@strata-js/rpcbridge-client
TypeScript icon, indicating that this package has built-in type declarations

1.3.0 • Public • Published

Strata WebSocket RPC Bridge Client

As simple client used to make calls to a Strata Service via the Strata RPC Bridge Server.

Installation

This package is published via NPM's npm repository.

// npm
$ npm add @strata-js/rpcbridge-client

// yarn
$ yarn add @strata-js/rpcbridge-client

Usage

import { WebSocketClient } from '@strata-js/rpcbridge-client';

const client = new WebSocketClient('http://rpcbridge-server.hostname.com/endpoint');
const response = await client.request('serviceName', 'context', 'operation', {/* Payload */});
console.log(response);

Future Improvements

  • HTTP Client
  • Better Error Handling
  • Custom Reconnect Logic

Readme

Keywords

none

Package Sidebar

Install

npm i @strata-js/rpcbridge-client

Weekly Downloads

5

Version

1.3.0

License

MIT

Unpacked Size

46.6 kB

Total Files

28

Last publish

Collaborators

  • morgul