Data is not inserted in HTTPS
<p>String is not inserted in HTTPS URL</p>

<p>Error like <strong>javax.net.ssl.SSLPeerUnverifiedException: No peer certificate</strong></p>

<pre><code>HttpClient client = new DefaultHttpClient();
    HttpPost request = new HttpPost(
            "https://www.mysite.com/cgi-bin/db.test?COMMAND=add&amp;TABLE=block_faces&amp;USER=1&amp;SUBSYSTEM=walker");
    UsernamePasswordCredentials login = new UsernamePasswordCredentials(
            "user", "pass");
    StringBuffer responseBuffer = null;

    try {
        request.addHeader(BasicScheme.authenticate(login, "UTF-8", false));

        final String body = String
                .format("{\"block_face_line\" : [{\"longitude\" : -71.34345555,\"latitude\" : 42.7794343 },{\"longitude\" : -71.4473179666667,\"latitude\" : 42.7336227666667  },  {\"longitude\" : -71.4461721166667,\"latitude\" : 42.7321493333333  },{\"longitude\" : -71.4473179662267,\"latitude\" : 42.726227666667  } ],\"block_face_curb_side\" : \"LEFT\",\"block_face_collector_id\" : \"3\"}");
        StringEntity xmlmessage = new StringEntity(body, HTTP.UTF_8);
        xmlmessage.setContentType("application/json");
        request.setHeader("Content-Type", "application/json;charset=UTF-8");
        request.setEntity(xmlmessage);

        HttpResponse response = client.execute(request);
        BufferedReader in = new BufferedReader(new InputStreamReader(
                response.getEntity().getContent()));
        responseBuffer = new StringBuffer();
        String line;

        while ((line = in.readLine()) != null) {
            responseBuffer.append(line);
        }
        in.close();
    } catch (Exception e) {
        e.printStackTrace();
    }

}
</code></pre>
