HTTPS URLConnection in gae

I’m playing with the Google App Engine with Java and I am quite excited…

It seems that HttpsURLConnection is not supported in gae, so it is recommended to use the URLConnection.

Using this method in practice seems to cause the following exception in development mode:
javax.net.ssl.SSLHandshakeException: Could not verify SSL certificate for:

but it also seems to work perfectly in production mode if you deploy your application.

Share

Android URLConnection ReadUTF example

URLConnection conn= null;
DataInputStream dis = null;
String url = "http://test.com/lalala.html";
StringBuffer sb1 = new StringBuffer();
try {
URL updateURL = new URL(url);
conn = updateURL.openConnection();
BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream(), 
"UTF8"));

String s = "";
while ((s = rd.readLine()) != null) {
sb1.append(s);
}
Log.i("AAAAA", sb1.toString());
Share