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)); |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |