A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Java
»
Sockets and Internet Protocols
Author
Passing a cookie using a socket?
Max Tomlinson
Ranch Hand
Joined: Jul 17, 2001
Posts: 364
posted
Sep 29, 2004 14:51:00
0
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
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter