rcp in ruby on rails

+2 votes
How can I connect multichain node with ruby code to store application data? Would it be like

url="http://" + auth + "@" + host + ":" + port

uri = URI.parse(url)
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new("Content-Type" => "application/json")'''
req.body = {method: 'publish', params:  ["transactionStream","key","0A0A"] , id: ::SecureRandom.uuid }.to_json
response = http.request(req)
asked Dec 3, 2019 by anonymous

1 Answer

0 votes
You may want to take a look at the Ruby library below to see how they do it:

https://github.com/theodi/multichain-client
answered Dec 5, 2019 by MultiChain
...