Ruby 使用 POST 方法提交数据

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

require 'net/http'

url = URI.parse('http://www.rubyinside.com/test.cgi')

response = Net::HTTP.post_form(url,{'name' => 'David', 'age' => '24'})
puts response.body