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
  • 155,156
  • 41
  • 207
  • 295
Dante
  • 677
  • 5
  • 11

0 Answers0