署名付き URL を使用してビデオ ファイルをクラウド ストレージにアップロードしようとしています。アップロードには HTTP put メソッドを使用します。「HttpsUrl`接続」を使用して接続しようとすると、javax.net.ssl.SSLHandshakeException: Handshake failedのようなエラーが返されます。この問題を解決するにはどうすればよいですか? これが私のコードです:
URL url = new URL(url_string);
httpsUrlConnection = (HttpsURLConnection) url.openConnection();
httpsUrlConnection.setDoOutput(true);
httpsUrlConnection.setDoInput(true);
httpsUrlConnection.setRequestMethod(requestMethod);
httpsUrlConnection.setRequestProperty("Content-Type", "application/json");
httpsUrlConnection.setRequestProperty("Accept", "application/json");
httpsUrlConnection.connect();
スタックトレースはこんな感じ
javax.net.ssl.SSLHandshakeException: Handshake failed
com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:390c)
com.android.okhttp.Connection.upgradeToTls(Connection.java:201)