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

后端 未结 7 971
说谎
说谎 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-11 11:38

    ranjith- I will store some sort of mapping between URI (main domain) and preferred protcol within application..can have pre-defined mappings based on what you know and then let that mapping grow as more Uris added..

提交回复
热议问题