1.0.0-beta.37 • Published 5 years ago

susyweb-providers-http v1.0.0-beta.37

Weekly downloads
3
License
LGPL-3.0
Repository
-
Last release
5 years ago

susyweb-providers-http

This is a sub package of susyweb.js

This is a HTTP provider for susyweb.js.
Please read the documentation for more.

Installation

Node.js

npm install susyweb-providers-http

In the Browser

Build running the following in the susyweb.js repository:

npm run-script build-all

Then include dist/susyweb-providers-http.js in your html file. This will expose the SusyWebHttpProvider object on the window object.

Usage

// in node.js
var SusyWebHttpProvider = require('susyweb-providers-http');

var options = {
    timeout: 20000, // milliseconds,
    headers: [{name: 'Access-Control-Allow-Origin', value: '*'},{...}]
};
var http = new SusyWebHttpProvider('http://localhost:8545', options);