tags:

views:

84

answers:

2

Hi

I want to open a stream to a httpS URL and read the data.

Kindly let me know how to do it.

Regards Chaitanya

A: 

In what language?

This is quite easy to do in something like PHP - a little more complex in other languages, though. Need more info before we can help!

arcwhite
The question is tagged as 'java'...
Gonzalo
Ohyeah. Whoops. My bad. :P
arcwhite
+1  A: 

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();
ChssPly76
Note that the default behaviour is to abort if a non-trusted certificate is found along the way. Very common for developers.
Thorbjørn Ravn Andersen
We have to take care of certificates.
Chaitanya MSV
So you've downvoted me because I didn't guess that from your question? You've asked "how to open the stream and read data" - that's what I answered.
ChssPly76