1.0.1 • Published 9 years ago

json-rpc-request v1.0.1

Weekly downloads
10
License
MIT
Repository
github
Last release
9 years ago

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

License

MIT