json-rpc-request

1.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i json-rpc-request

Weekly Downloads

5

Version

1.0.1

License

MIT

Last publish

Collaborators

  • claudijo