Using BouncyCastle for a simple HTTPS query
问题 Here's a simplified version of the code I'm using to perform simple HTTPS requests: // Assume the variables host, file and postData have valid String values final URL url = new URL("https", host, file); final HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("POST"); connection.setDoInput(true); connection.setDoOutput(true); connection.setRequestProperty("Content-length", String.valueOf(postData.length())); final DataOutputStream output = new