# File lib/mechanize.rb, line 242 def submit(form, button=nil) form.add_button_to_query(button) if button uri = to_absolute_uri(form.action) case form.method.upcase when 'POST' post_form(uri, form) when 'GET' uri.query = WWW::Mechanize.build_query_string(form.build_query) get(uri) else raise "unsupported method: #{form.method.upcase}" end end