Is HttpUrlConnection used for Https(443 port only) URLs to check it is active or not?

184 views Asked by At

Actually my requirement is just to check whether Url is active or not? For that I am using HttpUrlConnection to check the Url responseCode … if I get the Response code then only I can say Url is active. But if the Url is on 443 port only and required SSL Certificate then HttpUrlConnection return a response code if Connection is successfully happened or it returns a SSLHandshakeException if SSL certificate required then how could we verify the URL is active.

How could I get the clientCertificate? Does SSL certificate required by the HttpUrlConnection for Https only Urls to the Url response code? Is there any Alternative tool present if HttpUrlConnection is not the right tool to fulfil all my requirements.

0

There are 0 answers