def goto(uri, headers = nil)
      uri = "http://#{uri}" unless uri =~ %r{://}

      request = HtmlUnit::WebRequest.new(::Java::JavaNet::URL.new(uri))

      request.setAdditionalHeaders(headers) if headers
      request.setCharset(@charset)

      rescue_status_code_exception do
        self.page = @webclient.getPage(request)
      end

      url()
    end
def goto(uri, headers = nil)
      uri = "http://#{uri}" unless uri =~ %r{://}

      request = HtmlUnit::WebRequest.new(::Java::JavaNet::URL.new(uri))

      request.setAdditionalHeaders(headers) if headers
      request.setCharset(@charset)

      rescue_status_code_exception do
        self.page = @webclient.getPage(request)
      end

      url()
    end
Goto the given URL

 @param [String] uri The url.
 @param [Hash] (optional) a Hash of HTTP headers to use for the request.

 @return [String] The url.