@Override protected void prepareConnection(HttpURLConnection connection) throws IOException { super.prepareConnection(connection); if (connection instanceof HttpsURLConnection) { HttpsURLConnection httpsConnection = (HttpsURLConnection) connection; httpsConnection.setSSLSocketFactory(createSslSocketFactory()); if (hostnameVerifier != null) { httpsConnection.setHostnameVerifier(hostnameVerifier); } } }
@Override protected void prepareConnection(HttpURLConnection connection) throws IOException { super.prepareConnection(connection); if (connection instanceof HttpsURLConnection) { HttpsURLConnection httpsConnection = (HttpsURLConnection) connection; httpsConnection.setSSLSocketFactory(createSslSocketFactory()); if (hostnameVerifier != null) { httpsConnection.setHostnameVerifier(hostnameVerifier); } } }
@Override protected void prepareConnection(HttpURLConnection connection) throws IOException { super.prepareConnection(connection); if (connection instanceof HttpsURLConnection) { HttpsURLConnection httpsConnection = (HttpsURLConnection) connection; httpsConnection.setSSLSocketFactory(createSslSocketFactory()); if (hostnameVerifier != null) { httpsConnection.setHostnameVerifier(hostnameVerifier); } } }