private static <T> HttpEntity<?> makeEntity(T config) {
    HttpHeaders headers = new HttpHeaders();
    headers.add(INCLUDE_CLASS_HEADER, "true");
    if (config instanceof HasFile) {
      MultiValueMap<String, Object> content = new LinkedMultiValueMap<>();
      File file = ((HasFile) config).getFile();
      if (file != null) {
        content.add(HasFile.FILE_PARAM, new FileSystemResource(file));
        content.add(HasFile.CONFIG_PARAM, config);
        return new HttpEntity<>(content, headers);
      }
    }
    return new HttpEntity<>(config, headers);
  }
Concrete implementation of {@link ClusterManagementServiceTransport} which uses Spring's
{@link RestTemplate} for communication between client and CMS endpoint.
geode-management/src/main/java/org/apache/geode/management/api/RestTemplateClusterManagementServiceTransport.java