title: Spring RestTemplate redirect 302
body: <p>I'm trying to use spring rest template to do a post request to login in.</p>
  
  <pre><code>RestTemplate restTemplate = new RestTemplate();
  
  HttpHeaders headers = new HttpHeaders();
  headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
  
  LinkedMultiValueMap&lt;String, Object&gt; mvm = new LinkedMultiValueMap&lt;String, Object&gt;();
  mvm.add("LoginForm_Login", "login");
  mvm.add("LoginForm_Password", "password");
  
  ResponseEntity&lt;String&gt; result = restTemplate.exchange(uriDWLogin, HttpMethod.POST, requestEntity, String.class);
  </code></pre>
  
  <p>My ResponseEntity status is 302, i want to follow this request to get the body response , because i didn't get the body for this request.</p>
  
  <pre><code>18:59:59.170 MAIN [http-nio-8080-exec-83] DEBUG c.d.s.c.DemandwareCtlr - loginToSandbox - StatusResponse - 302
  18:59:59.170 MAIN [http-nio-8080-exec-83] DEBUG c.d.s.c.DemandwareCtlr - loginToSandbox - BodyResponse - 
  </code></pre>
  
  <p>What can I do to solve this problem ?!</p>