@Override
    public Pair<THBaseService.Client, TTransport> getClient() throws IOException {
      Preconditions.checkArgument(connection.getHost().startsWith("http"),
        "http client host must start with http or https");
      String url = connection.getHost() + ":" + connection.getPort();
      try {
        THttpClient httpClient = new THttpClient(url, connection.getHttpClient());
        for (Map.Entry<String, String> header : customHeader.entrySet()) {
          httpClient.setCustomHeader(header.getKey(), header.getValue());
        }
        httpClient.open();
        TProtocol prot = new TBinaryProtocol(httpClient);
        THBaseService.Client client = new THBaseService.Client(prot);
        return new Pair<>(client, httpClient);
      } catch (TTransportException e) {
        throw new IOException(e);
      }

    }
the default thrift http client builder. One can extend the ThriftClientBuilder to builder
custom http client, implement features like authentication or
'DoAs'(hbase-examples/thrift/HttpDoAsClient)
hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/client/ThriftConnection.java