jayson-rpc-vue

1.1.2 • Public • Published

JAYSON-RPC Vue.js integration

Install

$ npm install jayson-rpc-vue

Open you main.js file and add the following

import JaysonRPC from 'jayson-rpc-vue'
 
Vue.use(JaysonRPC, 'URL', https = false);

In your .vue file, to make a call just do it using

this.$JaysonRPC.request('method_name', ['params'], function(err, response) {
      if (err) throw err;
      console.log(response.result); // 2
});

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i jayson-rpc-vue

    Weekly Downloads

    5

    Version

    1.1.2

    License

    MIT

    Unpacked Size

    1.42 kB

    Total Files

    3

    Last publish

    Collaborators

    • pedroresende