private ApiResponse getApiResponse(final HttpUriRequest request) throws IOException, InternalApiException {
        final CloseableHttpResponse httpResponse = httpClient.execute(request, httpContext);
        try {
            HttpEntity entity = httpResponse.getEntity();
            if (entity != null) {
                final int code = httpResponse.getStatusLine().getStatusCode();
                final String body = EntityUtils.toString(entity);

                Logger.info("[HTTP STATUS]: [%s], [HTTP RESPONSE]: [%s]", code, body);

                if (isBlank(body)) {
                    throw new InternalApiException("Api response is blank.");
                }
                if (HttpStatus.error(code)) {
                    String message = String.format("Error: [%s], message: [%s].", code, body);
                    throw new InternalApiException(message);
                }
                return new ApiResponseImpl(code, body);
            }
        } finally {
            httpResponse.close();
        }
        return ApiResponseImpl.createEmpty();
    }