json-rpc-request
v1.0.1
Published
JSON RPC 2.0 request object constructor.
Downloads
13
Readme
JSON RPC 2.0 Request
Constructor for JSON RPC 2.0 request objects.
Also see related packages json-rpc-response, json-rpc-notification, and json-rpc-error
Installation
npm install json-rpc-request
Usage
new JsonRpcRequest(id, method[, params]);
Request objects can be constructed with or without using the new
keyword.
Example
var JsonRpcRequest = require('json-rpc-request');
// Request with params
new JsonRpcRequest(1, 'subtract', [42, 23]);
// Request without params
new JsonRpcRequest(2, 'ping');
Test
Run unit tests;
$ npm test