How i can send a json request using the poster

+1 vote

How i can send a json request using the poster, where as i have successfully deployed and connected it with web demo.

I am using the below details while sending the json request 
URL :-  http://<target id>:<port>/multichain-cli/test/getinfo

content type :- application/json

while sending a request i am getting a "Not Found"  where as i also tried with their authentication by adding the below detail as well 

#username :- multichainrpc

#password :- 9XJFHwysrsLF9ZAV1nWg3NW4T7mgCpinLtLX73qUYmtv


please help me out to resolve this issue


asked Jul 14, 2017 by vivek

1 Answer

0 votes

With JSON-RPC APIs, you don't specify the method to call within the URL, and you also don't need to include multichain-cli or the blockchain name. The URL endpoint is simply http://[ip-address]:[port]/  (with HTTP basic authentication to pass the username and password) and everything else is specified within the request payload. If you follow the 'Getting Started' tutorial and look at the first line output by multichain-cli for each command, you'll see the exact payload for the JSON-RPC request. Or take a look at some of the libraries at the end of the Developers page:

answered Jul 14, 2017 by MultiChain