class Defaults {

    public static BiFunction<HttpRequestBase, HttpResponse, String> asString() {
        return (request, response) -> {
            try (InputStream content = response.getEntity().getContent()) {
                return IOUtils.toString(content, UTF_8);
            } catch (IOException e) {
                throw new TDPException(CommonErrorCodes.UNEXPECTED_EXCEPTION, e);
            } finally {
                EntityUtils.consumeQuietly(response.getEntity());
                request.releaseConnection();
            }
        };
    }

    private  Defaults();

}