Skip to content

Instantly share code, notes, and snippets.

View nettree's full-sized avatar

Zhi nettree

View GitHub Profile
/**
* By pass the SSL validation
* @param url URL used to establish connection
* @return
* @throws Exception
*/
private HttpsURLConnection getSSLConnection(String url) throws Exception {
URL accessUrl = new URL(url);
TrustManager[] trustAllCerts = new TrustManager[] {new X509TrustManager() {