@mainframe/rpc-ws-browser

WebSocket RPC for browser

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@mainframe/rpc-ws-browser
110.3.04 years ago4 years agoMinified + gzip package size for @mainframe/rpc-ws-browser in KB

Readme

rpc-ws-browser
rpc-stream factory using transport-ws-browser.

Installation

yarn add @mainframe/rpc-ws-browser

Usage

import wsRPC from '@mainframe/rpc-ws-browser'

const rpc = wsRPC('ws://localhost')

rpc.request('getUser', ['1234']).then(console.log)

API

wsRPC()

Arguments
  1. url: string

Returns StreamRPC

License

MIT