我想用HttpURLConnection發送something.crt。如何用Java HttpURLConnection發送SSL證書
它總是說是這樣的:
javax.net.ssl.SSLException:收到致命警報:unexpected_message
字符串requestURL = 「https://some.thing.com:5874/SomeService/OperationsEndpoint1」;
HttpsURLConnection的連接=(HttpsURLConnection的)新
URL(requestURL).openConnection();
connection.setRequestMethod(「POST」);
String httpCode = connection.getResponseCode();
String responseMessage = connection.getResponseMessage();
感謝但不工作,同樣的錯誤。 – Pritom
你能否提供一些細節。也許有些代碼可以幫助 –