title: InputStream returns 0 with HttpUrlConnection in Android
body: <p>I'm doing a <code>HttpUrlConnection</code> in Android application with an <code>URL</code>. The <code>URL</code> is giving me response in the browser but in the code below <code>InputStream</code> response is <code>0</code>. Why?</p>
  
  <p>Here's my code:</p>
  
  <pre><code>URL url = new URL("https://certify.securenet.com/payment.scrnt");
  
  HttpURLConnection httpCon = (HttpURLConnection)url.openConnection();
  InputStream in = httpCon.getInputStream();
  
  byte content[] = new byte[in.available()];
  in.read(content, 0, content.length);
  String receivedString = new String(content);
  Log.d("Received String", receivedString)
  </code></pre>