private HttpClient getNewClient(String baseUrl) throws TikaConfigException {
        if (httpClient instanceof CloseableHttpClient) {
            try {
                ((CloseableHttpClient) httpClient).close();
            } catch (IOException e) {
                LOGGER.warn("exception closing client", e);
            }
        }
        return httpClientFactory.build();
    }
@param baseUrl url to base endpoint
tika-server/tika-server-client/src/main/java/org/apache/tika/server/client/TikaPipesHttpClient.java