title: Use Token in RestTemplate
body: <p>I want to use this RestTemplate code to make POST requests.</p>
  
  <pre><code>@Bean(name = "simpleRestTemplate")
      public RestTemplate getRestClient() {
  
          RestTemplate restClient = new RestTemplate(getClientHttpRequestFactory());
          restClient.getInterceptors().add(new BasicAuthorizationInterceptor("username", "password"));
          HttpEntity&lt;PaymentTransaction&gt; request = new HttpEntity&lt;&gt;(new PaymentTransaction());
          ResponseEntity&lt;PaymentTransaction&gt; response = restClient.exchange("http://example.com", HttpMethod.POST,
                  request, PaymentTransaction.class);
          PaymentTransaction foo = response.getBody();
  
          return restClient;
      }
  </code></pre>
  
  <p>How I can add Toke authentication into the HTTP link?</p>
  
  <p>Probably the easiest way is to use <code>exchange("http://example.com" + "/" + token, HttpMethod.POST,</code></p>
  
  <p>Is there any better way?</p>