Passing arrays using Net-http in Ruby

Hi all, We needed to use net/http of ruby for sending parameters between two modules. We decided to use the get and the post request of http as follows: url = URI.parse(“http://SERVER:PORT”) http = Net::HTTP.new(url.host, url.port) request = Net::HTTP::Get.new(“/method_name?parameter=a”) response = http.request(request) In the above get request the parameter “a” is taken to the “http://SERVER:PORT/method_name” and data related to it is queried. url = URI.parse(“http://SERVER:PORT”) http = Net::HTTP.new(url.host, url.port) request = Net::HTTP::Post.new(“/method_name”) request.set_form_data({“parameter1” => “a”, “parameter2” => “b”, “parameter3” =>

Continue Reading

Site Footer