3

如何将 post 参数传递给rest-open-uri::openRuby 中的函数?

我的代码是:

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}
4

0 回答 0