I needed to have multi-page HTTP mail from one application to another, which included a file attachment and a hash of the attached parameters. I tried using HTTPClientone that worked for file attachments, however I could not get the options for sending the attached format.
data_params = Hash.new
data_params[:params] = Hash.new
data_params[:params][:f] = Hash.new
data_params[:params][:d] = Hash.new
data_params[:params][:d][:name] = "Mich"
data_params[:params][:d][:city] = "Ostin"
data_params[:params][:f][:event] = "Sundance"
http_client = HTTPClient.new
body = data_params[:params]
response = http_client.post('http://localhost:3030/receiver/receive_test_data/', body)
when the receiving application sees the parameters as {"d"=>"nameMichcityOstin","f"=>"eventSundance"}(with a hash collapsing into lines at a nested level)
, HTTP - . JSON, , , , , . , " " .