class HttpDriver implements Closeable {

    public String doGet(final String url) throws IOException {
        LOGGER.debug("Requesting api for {}", url);
        HttpGet httpGet = new HttpGet(url);

        // Retry when IOException occurs
        for (int i = 0; i < clientMaxRetries; i++) {
            try (CloseableHttpResponse response = client.execute(httpGet)) {
                if (response != null) {
                    int statusCode = response.getStatusLine().getStatusCode();
                    if (statusCode == 200) {
                        String data = EntityUtils.toString(response.getEntity());
                        LOGGER.debug("Data received: {}, from: {}", data, url);
                        return data;
                    }

                    LOGGER.error("Received bad status: {} from: {}", statusCode, url);
                    response.getEntity().getContent().close();
                    return "";
                }
            } catch (IOException ex) {
                LOGGER.error("Failed to get response from server {} retry: {}/{}, exception: ", url, i, clientMaxRetries, ex);
                try {
                    TimeUnit.MILLISECONDS.sleep(clientRetryIntervalMs);
                } catch (InterruptedException ignored) {
                }
            }
        }
        throw new IOException("Failed to get response from server: " + url);
    }

    public  HttpDriver(Builder builder);

}