json-rpc-client-fetch-withcredentials

A simple fetch based JSON RPC client written in ES6.

Usage no npm install needed!

<script type="module">
  import jsonRpcClientFetchWithcredentials from 'https://cdn.skypack.dev/json-rpc-client-fetch-withcredentials';
</script>

README

JSON-RPC-CLIENT-FETCH-WITHCREDENTIALS

INSTALL

$ yarn add json-rpc-client-fetch-withcredentials

Open you main.js file and add the following:

import JsonRpcClient from 'json-rpc-client-fetch-withcredentials';

let client = new JsonRpcClient(<url>, <credencials>, newHeaders, debug)

client.request('method_name', {params})
.then((response) => {
    console.log(response);
})