Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including vue-json-rpc-client-fetch-withcredentials with all npm packages installed. Try it out:

var vueJsonRpcClientFetchWithcredentials = require("vue-json-rpc-client-fetch-withcredentials")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

vue-json-rpc-client-fetch-withcredentials v1.5.0

A simple vue.js fetch based JSON RPC client written in ES6.

VUE-JS-JSON-RPC-CLIENT-WITHCREDENTIALS Vue.js integration

Install

$ npm install vue-json-rpc-client-fetch-withcredentials

Open you main.js file and add the following

import JsonRpcVueClient from 'vue-json-rpc-client-fetch-withcredentials'

Vue.use(JsonRpcVueClient, 'URL', 'CREDENTIALS', 'NEWHEADERS', 'DEBUG');

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

this.$JsonRpcVueClient.request('method_name', {params})
.then((response) => {
    console.log(response);
})
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free