aspose file tools
The moose likes Sockets and Internet Protocols and the fly likes Passing a cookie using a socket? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "Passing a cookie using a socket? " Watch "Passing a cookie using a socket? " New topic
Author

Passing a cookie using a socket?

Max Tomlinson
Ranch Hand

Joined: Jul 17, 2001
Posts: 364
Can I do this? Pass a cookie to an HTTP request via a socket?:

String cookieData = "Cookie: SOMECOOKIE=0909214809248jfd";
java.net.URL url =
new java.net.URL("http://localhost:9080/ADCWeb/ibm_security_logout");
java.net.URLConnection conn = url.openConnection();
conn.setDoOutput(true);
OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
wr.write(cookieData);
wr.flush();

thanks
Max
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Passing a cookie using a socket?
 
Similar Threads
Communication Between ServerSocket and Socket
HTTPS Post Request through the URL
useSystemProxies breaks sockets?
socket's http connection
retrieve the HTML page of any URL without using java.net.URL