We have Json RPC response in {},{},{}
We are unable to save the response as a variable but can see it via console.log() after doing Jsonrcp.parse(response) which we got from the below library
We are using the JsonRPC-Lite library https://www.npmjs.com/package/jsonrpc-lite.
This is our code
axios
.post(
"https://ipfs.infura.io:5001/api/v0/add?wrap-with-directory=true",
data,
{
headers: {
"Content-Type": "multipart/form-data",
},
}
)
.then(function (response) {
this.setState({ apireturm: reponse.data });
console.log(response.data);
})
.catch(function () {
console.log("FAILURE!!");
});