title: Spring RestTemplate GET with parameters
body: <p>I have to make a <code>REST</code> call that includes custom headers and query parameters. I set my <code>HttpEntity</code> with just the headers (no body), and I use the <code>RestTemplate.exchange()</code> method as follows:</p>
  
  <pre><code>HttpHeaders headers = new HttpHeaders();
  headers.set("Accept", "application/json");
  
  Map&lt;String, String&gt; params = new HashMap&lt;String, String&gt;();
  params.put("msisdn", msisdn);
  params.put("email", email);
  params.put("clientVersion", clientVersion);
  params.put("clientType", clientType);
  params.put("issuerName", issuerName);
  params.put("applicationName", applicationName);
  
  HttpEntity entity = new HttpEntity(headers);
  
  HttpEntity&lt;String&gt; response = restTemplate.exchange(url, HttpMethod.GET, entity, String.class, params);
  </code></pre>
  
  <p>This fails at the client end with the <code>dispatcher servlet</code> being unable to resolve the request to a handler. Having debugged it, it looks like the request parameters are not being sent.</p>
  
  <p>When I do a an exchange with a <code>POST</code> using a request body and no query parameters it works just fine.</p>
  
  <p>Does anyone have any ideas?</p>