How to ignore PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException?

前端 未结 8 704
旧巷少年郎
旧巷少年郎 2020-11-28 03:29

I got the following exception when try to post a request to a http server:

Here is the code I used

URL url = new URL(
        \"https://www.abc.com\"         


        
8条回答
  •  自闭症患者
    2020-11-28 04:06

    Set validateTLSCertificates property to false for your JSoup command.

    Jsoup.connect("https://google.com/").validateTLSCertificates(false).get();
    

提交回复
热议问题