1
我有自定義SSLSoсket
,與HttpsUrlConnection
或OkHttp
庫很好。我如何與我的插座WebView
交朋友?WebView和SSLSocket
connection = (HttpsURLConnection) urlConnection.openConnection();
connection.setSSLSocketFactory(new OpenSSLSocketFactoryImpl());
connection.setInstanceFollowRedirects(false);
connection.setDoInput(true);
connection.setDoOutput(isPostRequest(method));
connection.setRequestMethod(method);
我想用自定義密碼套件通過webview打開我的網站。我該怎麼做?我發現解決方案在shouldInterceptRequest(WebViewClient)中使用HttpsUrlConnection,但我認爲這是不好的決定。 –