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,370 points
1,136 views

1 answer to this question.

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
• 17,100 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, 2019 in Blockchain by SHRADDHA
1,088 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,720 points
1,908 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
• 26,740 points
2,529 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,473 views
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
• 26,740 points
1,039 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
• 17,100 points
3,005 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP