Results 21 to 23 of 23
Thread: URLConnection Efficiency
- 08-19-2010, 06:05 PM #21
Oh. Thought the URLConnection does that for you, like make sure all the default headers are set for you.
After doing
I realize that no headers are set for you. :\Java Code:GConnection.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; H010818)"); Map<String, List<String>> properties = GConnection.getRequestProperties(); for (String s : properties.keySet()) System.out.printf("%s: %s%n", s, properties.get(s));
I was wondering, is this how you would send cookies too?"Experience is what you get when you don't get what you want" (Dan Stanford)
"Rise and rise again until lambs become lions" (Robin Hood)
- 08-19-2010, 06:17 PM #22
I dont know anything about java and cookies, but I do know about Javascript and cookies.
Here is the API on java cookie
http://download-llnw.oracle.com/java...tp/Cookie.html:rolleyes: ~ Sno ~ :rolleyes:
'-~ B.S. Computer Science ~-'
- 08-19-2010, 06:27 PM #23
Similar Threads
-
An Efficiency Question
By Revenna in forum Java 2DReplies: 0Last Post: 06-25-2010, 07:22 AM -
URLConnection not timing out as expected
By StephenS in forum NetworkingReplies: 2Last Post: 04-02-2010, 03:10 AM -
How to set request parameters to an URLConnection
By somesh A in forum NetworkingReplies: 0Last Post: 04-10-2009, 08:08 AM -
method efficiency
By TheWave in forum Advanced JavaReplies: 0Last Post: 02-13-2008, 04:11 AM -
Opening URLConnection
By Java Tip in forum Java TipReplies: 0Last Post: 11-24-2007, 07:37 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks