title: Having empty response body when trying to get lists of Objects with RestTemplate
body: <p>So i'm working on a REST client that consumes a REST API to get list of json objects using the Spring RestTemplate. I'm setting the necessary headers with the api key. So i get a HTTP 200 OK response but the response body is empty. When I do the same request using the Postman it works well. What might be the reason for this?</p>
  
  <p>The code snippet :</p>
  
  <pre><code> public List&lt;PoyntSubscription&gt; getSubscriptions(String apiToken, String cloudId, String cloudBaseUrl) {
      List&lt;PoyntSubscription&gt; subscriptions = new ArrayList&lt;&gt;();
  
      RestTemplate restTemplate = new RestTemplate();
      HttpHeaders headers = new HttpHeaders();
      headers.setContentType(MediaType.APPLICATION_JSON);
      headers.set("Api-Version", "1.2");
      headers.set("Authorization", apiToken);
      HttpEntity entity = new HttpEntity(headers);
  
      ResponseEntity&lt;PoyntSubscription&gt; response = restTemplate.exchange(
              cloudBaseUrl + cloudId + "/subscriptions?start=10", HttpMethod.GET, entity, PoyntSubcriptionsList.class);
      return response.getBody().getSubscriptions();
  }
  </code></pre>
  
  <p>The response json i'm getting when the API is consumed by the postman:</p>
  
  <pre><code>{
  "list": [
      {
          "startAt": "2019-01-22T00:00:00Z",
          "paymentStatus": "OVERDUE",
          "createdAt": "2019-01-22T03:05:28Z",
          "updatedAt": "2019-02-21T03:05:28Z",
          "businessId": "xxxx",
          "appId": "xxxx",
          "subscriptionId": "xxxxx",
          "phase": "FULL",
          "planId": "xxxx",
          "bundleId": "xxxx",
          "planName": "xxxx",
          "status": "ACTIVE"
      }
   ],
   "start": 10,
   "total": 14,
   "count": 4
  }
  </code></pre>
  
  <p>PoyntSubscription wrapper class: </p>
  
  <pre><code>public class PoyntSubcriptionsList {
  private List&lt;PoyntSubscription&gt; subscriptions = new ArrayList();
  
  public PoyntSubcriptionsList() {
  }
  
  public List&lt;PoyntSubscription&gt; getSubscriptions() {
      return this.subscriptions;
  }
  
  public void setSubscriptions(List&lt;PoyntSubscription&gt; subscriptions) {
      this.subscriptions = subscriptions;
   }
  }
  </code></pre>
  
  <p>PoyntSubscription class : </p>
  
  <pre><code>public class PoyntSubscription {
  private String startedDate;
  private String paymentStatus;
  private String createdDate;
  private String updatedDate;
  private String businessId;
  private String appId;
  private String subscriptionId;
  private String phase;
  private String planId;
  private String bundleId;
  private String planName;
  private String status;
  
  public PoyntSubscription() {
  }
  </code></pre>