Over a million developers have joined DZone.
Gold Partner

Many Mechanize Examples

See several great mechanize examples.

· Java Zone

require 'rubygems'
require 'mechanize'
agent = WWW::Mechanize.new
agent.set_proxy('localhost', '8000')
agent.user_agent = 'Individueller User-Agent'
agent.user_agent_alias = 'Linux Mozilla'
agent.open_timeout = 3
agent.read_timeout = 4
agent.keep_alive = false

agent.max_history = 0 # reduce memory if you make lots of requests


Topics:
java,mechanize

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}