@erebos/rpc-browser
RPC for browser
Last updated a year ago by paul_lecam .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @erebos/rpc-browser 
SYNC missed versions from official npm registry.

rpc-browser

rpc-request or rpc-stream factory with automatic transport selection.

Installation

yarn add @erebos/rpc-browser

Usage

import browserRPC from '@erebos/rpc-browser'

const rpcOverHTTP = browserRPC('http://localhost') // RequestRPC using HTTP transport
const rpcOverWS = browserRPC('ws://localhost') // StreamRPC using WebSocket transport

API

browserRPC()

Arguments

  1. endpoint: string: HTTP or WebSocket URL to connect to.

Returns RequestRPC (with HTTP endpoint) or StreamRPC (with WebSocket endpoint).

License

MIT

Current Tags

  • 0.11.0                                ...           latest (a year ago)

2 Versions

  • 0.11.0                                ...           a year ago
  • 0.10.0                                ...           a year ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |