title: RestTemplate GET method with path variables
body: <p>I am trying to make rest call using rest template. I have two header parameters and one path variable to set for the API call. Below is my implementation. But I am receiving HttpServerErrorException: 500 null. Am I setting the path variable in the right way?</p>
  
  <p>Target API: drs/v1/{caseId}</p>
  
  <pre><code>String url = configProperties.getCaseCreateUrl();
                  if(!StringUtils.isEmpty(url)){
                          url = url.replace(ApplicationConstants.DOMAIN_NAME,currentUser.domainUrl());
                          url = url+ caseId;
                  }
                  HttpHeaders headers = new HttpHeaders();
                  headers.set(ApplicationConstants.PS_TOKEN_HEADER, currentUser.getToken());
                  headers.set(ApplicationConstants.WORGROUP_HEADER, currentUser.getWorkgroupId());
                  headers.set(ApplicationConstants.DOMAIN_HEADER, currentUser.getDomainId());
                  headers.set(HttpHeaders.CONTENT_TYPE, MediaType.ALL_VALUE);
                  HttpsTrustManager.allowAllSSL();
                  RestTemplate restTemplate = new RestTemplate();
                  HttpEntity&lt;Map&lt;String, String&gt;&gt; requestEntity = new HttpEntity(null, headers);
                  ResponseEntity&lt;CaseDetailsDTO&gt; response = restTemplate.exchange(url, HttpMethod.GET, requestEntity, CaseDetailsDTO.class);
  </code></pre>