Tag: Mechanize
gem install mechanize
require "rubygems" require "mechanize" agent= Mechanize.new() agent.auth("user", "password") page= agent.get("http://example.com/") print(page.body)
require "rubygems" require "mechanize" agent= Mechanize.new() page= agent.post("http://example.com/", {"key" => "value"}) print(page.body)
.... a_2 = "#{request.method}:#{uri.request_uri}" .... header << "uri=\"#{uri.request_uri}\", " ....