• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

httpclient - commons

 
friso dejonge
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i just read some articles on the commons, but i am looking specifically at the httpclient now. It looks to me like this can be used, maybe is used as some sort of testing engine like the httpunit.jar
Retrieve a webpage, and take a look at the outcome.
So my questions are:
1. can you chain pages, like filling in a form stretching over multiple pages, and then test the whole form filling procedure
2. can you use javascript in this httpclient, and use the dom-model ?
thanks
friso
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Commons HttpClient doesn't deal with the HTML/JavaScript level you're describing -- it concentrates on implementing the HTTP protocol and doing it well.
HttpUnit (and HtmlUnit, JWebUnit) on the other hand supports filling and submitting HTML forms and, to some degree, JavaScript on HTML pages.
 
Harshad Oak
Author
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HttpClient is concerned with sending HTTP requests from Java code and then handling the response in Java code.
If i am not mistaken, HtmlUnit uses HttpClient.
 
Surasak Leenapongpanit
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Lasse Koskela and Harshad Oak, please see HttpClient features.
 
friso dejonge
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i get the point. thanks,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic