Hello Tom,

You can set the USER_AGENT property in the
HttpMethodParams.

HTML parsing is totally out of scope of the HTTP client.
There are other projects that provide HTML parsers,
including one on Sourceforge:
http://sourceforge.net/projects/javahtmlparser
You may also want to check the open source software
from W3C:
http://www.w3.org/Status
There's a list of components towards the bottom of the
page.

cheers,
  Roland







"TP Diffenbach" <[EMAIL PROTECTED]>
09.02.2004 01:40
Please respond to "Commons HttpClient Project"
 
        To:     <[EMAIL PROTECTED]>
        cc: 
        Subject:        setting User agent? Parsing HTML?


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.

Thanks,
Tom


---------------------------------------------------------------------
To unsubscribe, e-mail: 
[EMAIL PROTECTED]
For additional commands, e-mail: 
[EMAIL PROTECTED]


Reply via email to