title: RestTemplate: exchange() vs postForEntity() vs execute()
body: <p>I am working on Rest API using Spring boot and I had to access an application's endpoint. I used <code>RestTemplate</code> for it. I was able to do it using 2 methods,</p>
  
  <ul>
  <li><p><strong><code>postForEntity()</code></strong>:</p>
  
  <pre><code>responseEntity = 
      restTemplate.postForEntity(uri, httpEntity, ResponseClass.class);
  </code></pre></li>
  <li><p><strong><code>exchange()</code></strong>:</p>
  
  <pre><code>responseEntity = 
      restTemplate.exchange(uri, HttpMethod.POST, httpEntity, ResponseClass.class);
  </code></pre></li>
  </ul>
  
  <p>I would like to know the usage and differences of these two methods.</p>
  
  <p>I also see another method <code>execute()</code>. Please shed some light on it. How and when to use it.</p>