Thread: http request
View Single Post
  #7 (permalink)  
Old 03-13-2008, 02:23 PM
aibtus's Avatar
aibtus aibtus is offline
Member
 
Join Date: Mar 2008
Location: Randburg, South Africa
Posts: 9
aibtus is on a distinguished road
Send a message via Yahoo to aibtus Send a message via Skype™ to aibtus
Quote:
Originally Posted by Eranga View Post
Just three lines to use.

Code:
URL myRequest = new URL(my_url_goes_here); BufferedReader in = new BufferedReader(new InputStreamReader(myRequest.openStream())); String str = in.readLine(); in.close();
What you think of it.

Eranga.

It looks simple enough and you say It works... I love it!!
Is the class URL a custom class --- if not, can you give us the full package name. It may come in handy in some other projects. If it is, can you highlight the implementation..

Nice code though!
Reply With Quote