views:

36

answers:

1

When I hit Search on London journey planner (e.g from Holborn to Savoy Pier), I get result in about 4 secs. When I do that with HttpClient using POST method, this line takes about 10 secs:

InputStream is = httpClient.execute(httpPost).getEntity().getContent();

Any ideas what can be the problem? I'm sending the same parameters as browser and I have also set User-Agent to Chrome.

+1  A: 

Difficult to say, what is your problem, without seeing the code that performs the test and the measurement.

One suggestion, for troubleshooting with HttpClient: use logging.

And, to remove human errors from this comparison, it would be advisable to use some command-line tool (e.g. wget) instead of the browser to perform the comparative POST.

Neeme Praks