开发者

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();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜