3

How do I pass post parameters to the function rest-open-uri::open in Ruby?

My code is:

HEADER = {
  "User-Agent"     => "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1",
  "Accept-Charset" => "utf-8",
  "Accept"         => "text/html"
}

open("http://example.com/", HEADER).each {|s| my_html << s}
the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Dante
  • 757
  • 1
  • 5
  • 12

0 Answers0