I have to use HTTPS for sending POST requests to a server (using a self-signed certificate). This is how I do it:
HttpClient httpClient = getHttpClient(); f
try this before performing the request
SSLSocketFactory ssl = (SSLSocketFactory)http.getConnectionManager().getSchemeRegistry().getScheme( "https" ).getSocketFactory(); ssl.setHostnameVerifier( SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER );