How can I send a post request to an external server from my app controller?
I tried with this but didn’t work:
require “uri”
require “net/http”
params = {“box1” => “Nothing is less important than which fork you use. Etiquette is the science of living. It embraces everything. It is ethics. It is honor. -Emily Post”,
“button1” => “Submit”}
x = Net::HTTP.post_form(URI.parse(“http://localhost:3000”),params)
puts x.body
Thanks in advance!