をHttpUrlConnection
使用して Android アプリケーションで実行していURL
ます。はURL
ブラウザで応答を返していますが、以下のコードではInputStream
応答は0
です。なんで?
これが私のコードです:
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)