How to open a stream to httpS URL
I want to open a stream to a httpS URL and read the data.
Kindly let me开发者_开发技巧 know how to do it.
Regards Chaitanya
Here's a Sun tutorial on Reading from / Writing to URL connection.
Opening HTTPS connection is no different from opening HTTP connection; if you need to use https-specific methods you can class cast the result of url.openConnection()
to HttpsURLConnection:
URL url = new URL("https://your.https.url.here/");
HttpsURLConnection connection = (HttpsURLConnection) myurl.openConnection();
精彩评论