title: How to send the POST request by http client 4.5.2
body: <p>I'm send a HTTP Post request using the http client like follow.</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;dependency&gt;
      &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
      &lt;artifactId&gt;httpclient&lt;/artifactId&gt;
      &lt;version&gt;4.5.2&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
      &lt;artifactId&gt;httpmime&lt;/artifactId&gt;
      &lt;version&gt;4.5.2&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>the server is require some params inclue:method(String),appKey(String),signMethod(String),img(byte[])..</p>
  
  <p>I use the follow code to send post, but response show that:"Missing required arguments:img".</p>
  
  <pre class="lang-java prettyprint-override"><code>// append URL
  String fullUrl = HttpRequestUtils.appendUrlRequestParams(API, params);
  
  // builder request entity
  MultipartEntityBuilder multipartEntityBuilder = MultipartEntityBuilder.create().setCharset(Charset.forName("UTF-8"));
  for(Entry&lt;String, String&gt; entry : params.entrySet()) {
      multipartEntityBuilder.addTextBody(entry.getKey(), entry.getValue());
  }
  multipartEntityBuilder.addBinaryBody(PictureUploadConstant.img, imgs);
  HttpEntity requestEntity = multipartEntityBuilder.build();
  
  // post
  HttpPost post = new HttpPost(fullUrl);
  post.setEntity(requestEntity);
  
  CloseableHttpClient httpClient = HttpClients.createDefault();
  CloseableHttpResponse response = null;
  try {
      // send post
      response = httpClient.execute(post);
      // response
      HttpEntity responseEntity = response.getEntity();
      String result = EntityUtils.toString(responseEntity);
      System.out.println("result" + result);
  } catch (IOException e) {
      e.printStackTrace();
  }
  </code></pre>
  
  <p>Anyone could tell me what 's wrong with it?</p>