hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "TP Diffenbach" ...@diffenbach.org>
Subject setting User agent? Parsing HTML?
Date Mon, 09 Feb 2004 00:40:20 GMT
Using the jakarta commons httpclient api, is there an easier way of setting
the User-agent header than adding it to each HttpMethod, as in:

      HttpMethod method = new GetMethod(loginUrl);
      method.setRequestHeader( "User-Agent", useragent ) ;

Once I've gotten a response body, are there any classes to parse it into an
HTML tree? I'm particularly interested in finding forms and their
attributes, so as to fill in the form and POST it.


To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org

View raw message