Menu Search Sign up

HttpURLConnection vs HttpsURLConnection

Both java classes can validate server SSL certificate and if not valid, ie, not matching the host name, will throw exceptions like "sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"