Httpclient doesn't know how to handle JavaScript or Ajax. You'll have to parse 
the response for urls etc and perform these Ajax calls "yourself"

Sendt fra min iPhone

> Den 16. feb. 2015 kl. 19.47 skrev jeevi tesh <[email protected]>:
> 
> I added header and still not working..
> below is my code. When I use firefoxdriver it work.. Looks like making ajax
> call but even after looking for several hours we not able to confirm that
> because of ajax call  we were not able to load. Any idea how to figure out
> ajax calls are made or not.
> Looking forward for replay
> thanks
> jeevitesh
> 
> 
> 
> HttpGet httget = new HttpGet("
> http://parts.arrow.com/item/search/?utm_campaign=arrowMain&utm_medium=link&utm_source=arrow&utm_content=www.arrow.com#st=ABLS-7.3728MHZ-B2-T;reNwlT
> ");
> HttpClient httpclient = HttpClientBuilder.create().setRedirectStrategy(new
> LaxRedirectStrategy()).build();
> httget.setHeader("User-Agent", "MySuperUserAgent");
> HttpResponse  response = httpclient.execute(httget);
> HttpEntity entity = response.getEntity();
> String thirdPartyPageContent=EntityUtils.toString(entity);
> 
> On Sat, Feb 14, 2015 at 11:15 PM, Stefan Magnus Landrø <
> [email protected]> wrote:
> 
>> Maybe use a different user-agent header?
>> 
>> Sendt fra min iPhone
>> 
>>> Den 14. feb. 2015 kl. 18.04 skrev jeevi tesh <[email protected]>:
>>> 
>>> Hi,
>>> Below URL's web page content I'm not able to get using httpclient. Please
>>> help me in this regard
>> http://parts.arrow.com/item/search/?utm_campaign=arrowMain&utm_medium=link&utm_source=arrow&utm_content=www.arrow.com#st=ABLS-7.3728MHZ-B2-T;reNwlT
>>> 
>>> Here is my piece of code
>>> 
>>> HttpGet httget = new HttpGet("
>> http://parts.arrow.com/item/search/?utm_campaign=arrowMain&utm_medium=link&utm_source=arrow&utm_content=www.arrow.com#st=ABLS-7.3728MHZ-B2-T;reNwlT
>>> ");
>>> 
>>> HttpClient httpclient = new DefaultHttpClient();
>>> HttpResponse  response = httpclient.execute(httget);
>>> HttpEntity entity = response.getEntity();
>>> String thirdPartyPageContent=EntityUtils.toString(entity);
>>> System.out.println(thirdPartyPageContent);
>>> 
>>> I'm not getting actual page content.
>>> 
>>> If any insight will be greatly appreciated.
>>> 
>>> Thanks
>>> jeevitesh
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
>> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to