require 'net/http'home = Net::HTTP.new("www.CodeSnippet.cn", 80) response, text = home.get("/list.html", nil)puts text #该片段来自于http://www.codesnippet.cn/detail/16112012438.html
来源: http://www.codesnippet.cn/detail/16112012438.html