Android :- Problem in getting response from a https request ,the second time the request is posted
<p>I'm trying to get data from a web service which is https://.....
Problem is I get proper response a first time the request is made but if another request is made there is no response.
The log shows only once "freeing OpenSSL session".</p>

<p>Here is the postonserver code.</p>

<pre><code>public static String postDataOnServer(String GETRequest) throws IOException {
    Log.e("Request : ", GETRequest);
    try {
        URL url = null;
        HttpURLConnection con = null;
        try {
            url = new URL(GETRequest);
            con = (HttpURLConnection) url.openConnection();
            con.setRequestMethod("GET");
            con.setUseCaches(false);
            con.setDoOutput(true);
            con.setDoInput(true);
            con.setRequestProperty("User-Agent", "test-ssl");
            con.setRequestProperty("Connection", "close");          
            con.connect();
        } 
        catch (IOException e) 
        {
            Log.e("IOException : ",  e.toString());
            return "Connection not established";
        }

        BufferedReader in = new BufferedReader(new InputStreamReader(con
                .getInputStream()));



        StringBuffer res = new StringBuffer();
        char[] chBuff = new char[1000];
        int len = 0;

        while ((len = in.read(chBuff)) &gt; 0)
            res.append(new String(chBuff, 0, len));


        in.close();
        System.gc();

        Log.e("Responce  :" , res.toString());  

        return res.toString();

    } catch (SocketTimeoutException e) {
        Log.e("Responce  :" , e.toString());
    }catch (Exception e) {          
    }
    return "";
}
</code></pre>

<p>Plz Reply ,Thank</p>
