I want to pass parameters to an url using post method in hyperledger composer, but i didn't found any example of it. I only found one example in sample code of composer..
function handlePost(postTransaction) {
var url = 'https://composer-node-red.mybluemix.net/compute';
return post( url, postTransaction)
.then(function (result) {
// alert(JSON.stringify(result));
postTransaction.asset.value = 'Count is ' + result.body.sum;
return getAssetRegistry('org.example.sample.SampleAsset')
.then(function (assetRegistry) {
return assetRegistry.update(postTransaction.asset);
});
});
}
In third parameter of post method how should i pass the objects.for example in above i want to pass postTransaction.asset.value to the specified url..
url string
The URL to post the data to
typed Typed
The typed instance to be posted. The instance will be serialized to JSON.
options object
The options that are passed to Serializer.toJSON
i want to use option parameter...