• Post Reply Bookmark Topic Watch Topic
  • New Topic

HttpClient login, search and get the HTML content

 
Danny Sater
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I want to login to a site using HttpClient and after logging in I want to search in the HTML content and retrieve the contents of the search result.



when I print the output from HttpEntity it's printing the login page contents. How do I get the contents of the page after I login using HttpClient?
I tried couple of other sites and it worked for me, but not for mint.com please help
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could use an HTTP monitor to see how the request differs between logging in via the web site, and logging in via HttpClient.

If this was my problem I'd use HtmlUnit instead of HttpClient, as it has a higher-level API for dealing with programmatic web access.
 
Danny Sater
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:You could use an HTTP monitor to see how the request differs between logging in via the web site, and logging in via HttpClient.

If this was my problem I'd use HtmlUnit instead of HttpClient, as it has a higher-level API for dealing with programmatic web access.


Thank you for this information... I'm still wondering why my code work for some sites and not for others ... Thanks in advance.
 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It all depends on the SSL security mechanism being used.

This is a fragment I wrote:


That may help or point you in the correct direction.

WP
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!