Skip to Content
0
Former Member
Apr 24, 2009 at 12:12 PM

How to read the response from a connection that is using cookie.

22 Views

Hello All,

I have a the following code that i am using to read the response that should be returned when the freebusyURL connects to the server.

freebusyURL = new URL("WWW.google.com"); // -


url to connect

freeBusyConnection= (HttpURLConnection) freebusyURL.openConnection(); //--- open a http connection for that URL

freeBusyConnection.setRequestProperty("Cookiee",cookie); --- set the cookie in the URL

freeBusyConnection.connect(); -


connects the url with the Cookie to the server.

httpResponse = freeBusyConnection.getInputStream(); //---- Using this line i want to read the HTTp response. but fails here as it throws IO Exception .

Can you please tell me other function that can be used in order to read the HTTP Response .

can you atleast guide me how this can be achieve if the method followed is wrong.

Thank ,

Anamika Mazumder.