submit (WWW::Mechanize)

    # File lib/www/mechanize.rb, line 340
        def submit(form, button=nil, headers={})
          form.add_button_to_query(button) if button
          case form.method.upcase
          when 'POST'
            post_form(form.action, form, headers)
          when 'GET'
            get(  :url      => form.action.gsub(/\?[^\?]*$/, ''),
                  :params   => form.build_query,
                  :headers  => headers,
                  :referer  => form.page
               )
          else
            raise "unsupported method: #{form.method.upcase}"
          end
        end