isomorphic-rpc
Advanced tools
Comparing version 1.1.1 to 1.2.0
@@ -7,2 +7,3 @@ const fetch = require('isomorphic-fetch') | ||
this.id = 1 | ||
this.fetchOptions = fetchOptions | ||
} | ||
@@ -16,3 +17,3 @@ static get(obj,prop){ | ||
method: "POST", | ||
headers: {"Content-Type": "application/json"}, | ||
headers: {"Content-Type": "application/json", "Accept": "application/json"}, | ||
body: JSON.stringify({ | ||
@@ -29,3 +30,3 @@ jsonrpc:"2.0", | ||
if (response.error) { | ||
throw new Error(response.error.message) | ||
throw new Error(response.error) | ||
}else{ | ||
@@ -32,0 +33,0 @@ return response.result |
{ | ||
"name": "isomorphic-rpc", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "A Javascript Object That Maps All Methods to RPC Calls as Promises (Isomorphic)", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
4280
35