1
2
3
4
5
6
7
8
9
10
11
12
13
| queryBody.method = 'query';
queryBody.params.ctorMsg.function = 'readAssetHistory';
queryBody.params.ctorMsg.args = [ "{\"assetID\":\""+selectedVehicle.assetID+"\"}"];
// Call blockchain readAsset function using rest api
https.request(options, function(res2) {
res2.setEncoding('utf8');
res2.on('data', function (chunk) {
console.log('BODY: ' + chunk);
var jbody_1 = JSON.parse(chunk);
var json_msg = jbody_1[0].result.message;
});
}).end(JSON.stringify(queryBody));
|