Alex D
Alex D

Reputation: 11

How can i get https responses on google app engine?

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 " + userNamePasswordB64);
connection.connect();       
BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream()));

Upvotes: 1

Views: 256

Answers (1)

Robert Kluin
Robert Kluin

Reputation: 8292

See the FetchOptions doNotValidateCertificate method. There is a note about this in the URL Fetch docs.

Upvotes: 1

Related Questions