Alex,
The sequence:
GetMethod getMethod = new GetMethod(url2);
getMethod.setHeader("Referer", url1);
does not compile, with the error message "symbol not found." I checked the
HttpClient API and it says that setHeader(String str1, String str2) is a
method of the Response class not the GetMethod class.
It looks like what I would like to do is something like:
Response response = new Response();
response.setHeader("Referer", url1);
Unfortunately there isn't a no argument Response constructor, just
Constructor Summary _Response_
(http://www.innovation.ch/java/HTTPClient/api/HTTPClient/Response.html#Response(java.lang.String,
int,
java.lang.String, HTTPClient.NVPair[], byte[], java.io.InputStream, int))
(_String_
(http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html) version,
int
status, _String_
(http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html) reason,
_NVPair_
(http://www.innovation.ch/java/HTTPClient/api/HTTPClient/NVPair.html) []
headers, byte[] data, _InputStream_
(http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputStream.html) is,
int cont_len)
Reference: http://www.innovation.ch/java/HTTPClient/api/index-all.html (see
setHeader)
Would this sequence be possible?