private <T> T getForEntity(
            String url,
            Object[] queryParams,
            Function<ClientResponse, T> entityProvider,
            Object... uriVariables) {
        URI uri = null;
        ClientResponse clientResponse;
        try {
            uri = getURIBuilder(root + url, queryParams).build(uriVariables);
            clientResponse = requestHandler.get(uri);
            if (clientResponse.getStatus() < 300) {
                return entityProvider.apply(clientResponse);
            } else {
                throw new UniformInterfaceException(clientResponse);
            }
        } catch (UniformInterfaceException e) {
            handleUniformInterfaceException(e, uri);
        } catch (RuntimeException e) {
            handleRuntimeException(e, uri);
        }
        return null;
    }
Abstract client for the REST server
client/src/main/java/com/netflix/conductor/client/http/ClientBase.java