Re:"How do I set the User-Agent string in Java?" - L. Page (...
by jdale27 on Tuesday October 06, 2009 @12:06PM
(#864465)
http://www.aquaphoenix.com/ref/jdk1.0.2_api/java.net.URLConn...
setRequestProperty is there.
Re:"How do I set the User-Agent string in Java?" - L. Page (...
by pyre on Tuesday October 06, 2009 @02:04PM
(#864780)
Yea, but there still isn't anything in those docs referring to the User-Agent string/property.
Re:"How do I set the User-Agent string in Java?" - L. Page (...
by simplegeek on Tuesday October 06, 2009 @06:22AM
(#863830)
I was simply curious, thanks for digging in :)
Re:"How do I set the User-Agent string in Java?" - L. Page (...
by sonofjanoh on Tuesday October 06, 2009 @05:08AM
(#863787)
Bottom line is that he saw potential in that setting...and what potential!
Wikipedia's history of Java verions says 1.0, as does the request string in the article. [http://en.wikipedia.org/wiki/Java_version_history]
Was URLConnection available back then?
According to the URLConnection docs it's been around since JDK 1.0. [http://java.sun.com/j2se/1.3/docs/api/java/net/URLConnection...]
Did URLConnection.SetRequestProperty exist back in JDK 1.0?
The closest I could find were the docs for JDK 1.1.8 in a downloadable zip file, and yes SetRequestProperty existed back in JDK 1.1.8 at least.
Looking at the actual response, and the JDK 1.1.8 docs, he would probably have been using HTTPURLConnection (could not find HttpClient anywhere in the jdk1.1.8 docs) and even HTTPURLConnection in JDK 1.1.8 I could not find the string 'agent' anywhere on the page.
So yea, if the settings were there they were buried and not readily accessible in the documentation of the time.