RPC client over HTTP
Purpose
RequestRPC
factory using the HTTP transport.
Installation
For browser
npm install @erebos/rpc-http-browser
For Node
npm install @erebos/rpc-http-node
Usage
import { createRPC } from '@erebos/rpc-http-browser'
const rpc = createRPC('http://localhost')
rpc.request('getUser', ['1234']).then(res => {
console.log(res)
})
API
createRPC()
Arguments
url: string
Returns RequestRPC