HTTPS In Android
<p>I have implemented HTTP Post to post data to the backend. How do I implement HTTPS in Android (I have already configured the backend for https)? </p>

<p>I googled and found some solutions:
<a href="http://stackoverflow.com/questions/2253061/secure-http-post-in-android">Secure HTTP Post in Android</a>  </p>

<p>and tried them but I do not receive any data in the backend. </p>

<p>Is it the correct way to implement? Is there any other method?</p>

<p>Below is my code snippet:</p>

<pre><code>              File file = new File(filepath);
         HttpClient client = new DefaultHttpClient();

             //String url = "http://test.....;
             String url = "https://test......";

         HttpPost post = new HttpPost(url);
             FileEntity bin = new FileEntity(file, url);

             post.setEntity(bin);

             HttpResponse response =  client.execute(post); 

             HttpEntity resEntity = response.getEntity();
</code></pre>

<p>Basically I am using fileentity to do a HTTPPost. Now I want to do this over https. After implementing https over at the backend I just modified http to https in the url and tested again. And it is not working.</p>

<p>Any idea how do i resolve this?</p>

<p>Thanks In Advance,
Perumal</p>
