code: public Response<Path> getFile(Endpoint endpoint, NameValuePair... headers) throws IOException {
  
          // Create the request
          HttpGet get = new HttpGet(endpoint.url());
          get.setHeaders(combineHeaders(headers));
          Path tempFile = null;
  
          // Send the request and process the response
          try (CloseableHttpResponse response = httpClient().execute(get)) {
  
              // Request the content
              HttpEntity entity = response.getEntity();
  
              // Download the content to a temporary file
              if (entity != null) {
                  tempFile = Files.createTempFile("download", "file");
                  try (InputStream input = entity.getContent();
                       OutputStream output = Files.newOutputStream(tempFile)) {
                      IOUtils.copy(input, output);
                  }
              }
  
              return new Response<>(response.getStatusLine(), tempFile);
          }
      }
docs: Sends a GET request and returns the response.
  
  @param endpoint The endpoint to send the request to.
  @param headers  Any additional headers to send with this request. You can use {@link org.apache.http.HttpHeaders} constants for header names.
  @return A {@link Path} to the downloaded content, if any.
  @throws IOException If an error occurs.
  @see java.nio.file.Files#probeContentType(Path)