title: How to get a generic map as a response from restTemplate exchange method?
body: <p>We have a rest service that returns a byte array inside a map of type . While receiving the response if I use Map without the generics, the byte array data is converted to a String. Is it possible to send just the byte data from the server, if so how to retrieve  that data from the client using RestTemplate?   </p>
  
  <pre><code> ResponseEntity&lt;Map&lt;String, byte[]&gt;&gt; result result = restTemplate.exchange("http://localhost:8085/api/fetchContent?Id=" + contentId+"&amp;userName=trump", HttpMethod.GET, entity, Map.class, params);
  </code></pre>
  
  <p>The above code will give  a compilation issue as the return type is a  map. </p>