class HttpRequester {

  Object extractResponse(ClientHttpResponse response) throws IOException {
    MediaType mediaType = response.getHeaders().getContentType();
    if (mediaType.equals(MediaType.APPLICATION_JSON)) {
      return org.apache.commons.io.IOUtils.toString(response.getBody(), "UTF-8");
    } else {
      Path tempFile = Files.createTempFile("fileDownload", "");
      if (tempFile.toFile().exists()) {
        FileUtils.deleteQuietly(tempFile.toFile());
      }
      Files.copy(response.getBody(), tempFile);
      return tempFile;
    }
  }

  public  HttpRequester();
  public  HttpRequester(Properties securityProperties);
    HttpRequester(Properties securityProperties, RestTemplate restTemplate);

}