What construction provides sending xml to some port?

def view z1 = Net::HTTP.get('localhost', '/avtm/view.xml',"3000"); xmls = Document.new(z1) @n = XPath.match(xmls, "//n").map {|x| x.text} end 

This is the intended result code. and one of the pages should transmit the result, and the other to read it. This is a well-formed, but non-posted page:

 def view() b=params[:b].to_i @z =avtomorfushka(b).size #собственная функция рассчетов @z z=avtomorfushka(b) respond_to do |format| format.html format.json { render json: @z z } format.xml { render xml: @z z } end end 
  • Do you want to generate xml and send the result of an HTTP request to some arbitrary address? - Vladimir Gordeev
  • > and one of the pages should transmit the result, and the other to read it. There is no such thing, there are HTTP requests (POST, GET, ...). Describe what you want to receive (in terms of requests). - Vladimir Gordeev

1 answer 1

You should look at Faraday .