title: sending post data to https without ssl cert verification with apache httpClient client
body: <p>I need to send post data to an https url using the apache HttpClient package,</p>
  <p>after sending the post data I need to retreive the html data.</p>
  <p>the post data that I'm sending is an XML string and the post data that I'm receving is an XML string.</p>
  <p>any information regarding the issue would be greatly appreciated.</p>
  <p>I googled and i found examples on the internet that uses DefaultHttpClient that now in version 4 is deprecated. so I'd like to know how to properly use the new version of the client.</p>
  <p>thanks.</p>
  <h1>update</h1>
  <pre><code>public String sendPost(final String request, final String postData) throws ClientProtocolException, IOException  {
      String result = null;
      CloseableHttpClient httpclient = HttpClients.createDefault();
      HttpPost httpPost = new HttpPost(request);
      CloseableHttpResponse response = httpclient.execute(httpPost);
      try {
          HttpEntity entity = response.getEntity();
          result = EntityUtils.toString(entity);
          EntityUtils.consume(entity);
      } finally {
          response.close();
      }
      return result;
  
  }
  </code></pre>
  <p>so far I came up with the this function that sends a request and retrieves a string from the response. I think it should work. the thing I'm missing is that I'm doing nothing with the postData. how do I sent post data with my request ?</p>