How to check given domain name http or https in java?

后端 未结 7 975
说谎
说谎 2021-01-11 10:48

My problem

In my android application I get url input from user, like \"www.google.com\".

I want to find out for the given url whether to use

7条回答
  •  感情败类
    2021-01-11 11:47

    You can't get it from just URL. It doesn't make sense. Some websites can work with both http & https. It depends upon website itself whether they use SSL certificate or not.

提交回复
热议问题