# File lib/www/mechanize.rb, line 283
    def submit(form, button=nil)
      form.add_button_to_query(button) if button
      uri = to_absolute_uri(form.action, form.page)
      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