Hyperledger fabric: curl not working to invoke chaincode

0 votes

I have the next problem: Curl is not working When i want to use the Rest api to call my chaincode. I checked the ip of my peers via docker inspect. The docker yaml file mentions the Port of the peer. If I enter :curl ip:port/chain, i get error connection reset By peer. Any idea maybe??? I can log into the cli container and Run peer chaincode commands successfully. Something seems to be wrong when I try rest. My network is based on the example first network as peovided By hyperledger docs.

Oct 23, 2018 in Blockchain by sabby
• 4,050 points
145 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Hyperledger Fabric does not offer a REST API natively. As noted, it uses gRPC for all interactions with the outside world.

However, Hyperledger Composer does have a means of generating and exposing a REST API for your application using Loopback/OpenAPI (Swagger) that you can then call from your client application (or expose as a web client). Further, there is work being done on developing a REST service sdk for Fabric.

While neither of these is mature, yet, the Composer option is more mature than the sdk, and is likely to be more relevant to your application.

answered Oct 23, 2018 by Perry
• 16,450 points

Related Questions In Blockchain

0 votes
2 answers

Not able to POST chaincode to hyperledger-fabric using API

TypeError: Cannot read property 'curve' of undefined     at ...READ MORE

answered Jan 30 in Blockchain by SHRADDHA
52 views
0 votes
1 answer

Not Able to register a user with Hyperledger-Fabric v1.1 preview

The error: "Certificate not found with AKI 'e729224e8b3f31784c8a93c5b8ef6f4c1c91d9e6e577c45c33163609fe40011' ...READ MORE

answered Jun 16, 2018 in Blockchain by charlie_brown
• 7,710 points
316 views
0 votes
1 answer

Hyperledger Fabric CA "Failed to get user: User not found"

The problem could be because of the ...READ MORE

answered Jul 23, 2018 in Blockchain by digger
• 27,620 points
391 views
0 votes
1 answer
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 27,620 points
52 views
+1 vote
1 answer
+16 votes
4 answers
+1 vote
2 answers

How to return value from a chaincode in Hyperledger Fabric?

Hyperledger Fabric supports only 2 types of ...READ MORE

answered Jun 13, 2018 in Blockchain by Perry
• 16,450 points
644 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.