title: Spring RestTemplate for post with multipart file and request paramters
body: <p>I'm getting a controller with a multipart file and  string[].
  I need to do a post method : using restTemplate.
  Currently I can either send multipart file or string [] but not both.</p>
  
  <pre><code>Map&lt;String, String[]&gt; paramMap = request.getParameterMap();
  MultiValueMap&lt;String, java.lang.Object&gt; body= new LinkedMultiValueMap&lt;&gt;();
  body.add("uploadFile", file);
  for (String key : paramMap.keySet()) {
      body.add(key, paramMap.get(key));
  }
  HttpEntity&lt;MultiValueMap&lt;String, Object&gt;&gt; requestEntity = new HttpEntity&lt;&gt;(body, headers);
  response = restTemplate.postForEntity(url, requestEntity, String.class);
  </code></pre>