views:

1226

answers:

2

Hi,

I need to read from an URL to String, and this is not a problem, but some sites demand for cookies to be enabled to provide content. So I need a way to get a content even if the cookies need to be accepted? Cheers

+2  A: 

You may give it a try to Apache's HTTPClient: http://hc.apache.org/httpclient-3.x/

It has support a lot of things. I don't remember if cookies are included, but I bet it does.

EDIT

It does :)

http://hc.apache.org/httpclient-3.x/cookies.html

OscarRyz
A: 

java.net supports cookies through HttpCookie.

Tom Hawtin - tackline