public HttpResponse executeURI(HttpUriRequest method, Header[] headers, String uri)
    throws IOException {
    // method.setURI(new URI(uri, true));
    for (Map.Entry<String, String> e : extraHeaders.entrySet()) {
      method.addHeader(e.getKey(), e.getValue());
    }
    if (headers != null) {
      for (Header header : headers) {
        method.addHeader(header);
      }
    }
    long startTime = EnvironmentEdgeManager.currentTime();
    if (resp != null) EntityUtils.consumeQuietly(resp.getEntity());
    if (stickyContext != null) {
      resp = httpClient.execute(method, stickyContext);
    } else {
      resp = httpClient.execute(method);
    }
    if (resp.getStatusLine().getStatusCode() == HttpStatus.SC_UNAUTHORIZED) {
      // Authentication error
      LOG.debug("Performing negotiation with the server.");
      try {
        negotiate(method, uri);
      } catch (GeneralSecurityException e) {
        throw new IOException(e);
      }
      if (stickyContext != null) {
        resp = httpClient.execute(method, stickyContext);
      } else {
        resp = httpClient.execute(method);
      }
    }

    long endTime = EnvironmentEdgeManager.currentTime();
    if (LOG.isTraceEnabled()) {
      LOG.trace(method.getMethod() + " " + uri + " " + resp.getStatusLine().getStatusCode() + " "
        + resp.getStatusLine().getReasonPhrase() + " in " + (endTime - startTime) + " ms");
    }
    return resp;
  }
Execute a transaction method given a complete URI.
@param method  the transaction method
@param headers HTTP header values to send
@param uri     a properly urlencoded URI
@return the HTTP response code
hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Client.java