I get this exception when trying to fetch response for an https link
javax.net.ssl.SSLHandshakeException: Could not verify SSL certificate for: https://[...link...]
Below is the code I use. What am I doing wrong?
URL productsURL = new URL(link + authenticationExtension);
URLConnection connection = productsURL.openConnection();
connection.setRequestProperty("Authorization", "Basic " + userNamePasswo开发者_JAVA百科rdB64);
connection.connect();       
BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream()));
See the FetchOptions doNotValidateCertificate method.  There is a note about this in the URL Fetch docs.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论