March 2019
Intermediate to advanced
636 pages
27h 50m
English
Once the chaincode has been initialized by an administrative user, our application is open for business. Now, any ordinary user (such as Jim in the importer's organization) may request a chaincode invocation or query. For example, a trade request can be made as follows:
curl -s -X POST http://localhost:4000/chaincode/requestTrade -H "authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MjUwMDU4NTQsInVzZXJuYW1lIjoiSmltIiwib3JnTmFtZSI6ImltcG9ydGVyb3JnIiwiaWF0IjoxNTI1MDAxNzE0fQ.yDX1PyKnpQAFC0mbo1uT1Vxgig0gXN9WNCwgp-1vj2g" -H "content-type: application/json" -d '{ "ccversion": "v0", "args": ["2ks89j9", "50000","Wood for Toys"] }'
Note that the chaincode version must be supplied in the request body. ...
Read now
Unlock full access