HttpURLConnectionInfo c = (HttpURLConnectionInfo) connectionInfo;
System.out.println("Http method: "
+ c.getHttpRequestMethod() + " on " + c.getURL());
}
if (connectionInfo instanceof HttpsURLConnectionInfo) {
HttpsURLConnectionInfo c = (HttpsURLConnectionInfo) connectionInfo;
System.out.println("TLS Connection to: " + c.getURL());
System.out.println("Enabled Cipher: " + c.getEnabledCipherSuite());
System.out.println("Local Principal: " + c.getLocalPrincipal());
System.out.println("Peer Principal: " + c.getPeerPrincipal());
}
//throw new UntrustedURLConnectionIOException("No Way Jose");
}