0

This is the scenario.

I do a HTTP POST using the HttpURLConnection class to post to a url say "https://www.abc.com", but this line:

in = new BufferedReader(new InputStreamReader(
                httpURLConnector.getInputStream()));
        response = in.readLine();

randomly gives me a null response. But if I remove the 's' from the url to become "http://www.abc.com", I get back all responses as expected with no null returns. The weird thing is that it works on the Nexus phone for https but it does not work for the HTC Wildfire. Can someone enlighten me on this? Thanks!

Maurice
  • 6,413
  • 13
  • 51
  • 76
  • I tried the solution from this link http://stackoverflow.com/questions/4233350/android-get-response-from-a-https-url and it worked. – Maurice Aug 19 '11 at 03:48

1 Answers1

0

You might want to check the HTTP status code, before trying to read anything. Post some code from the `HttpURLConnector'.

Nikolay Elenkov
  • 52,576
  • 10
  • 84
  • 84