You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Allistair Crossley <a....@obvious.uk.com> on 2002/04/25 12:35:59 UTC

HttpClient PostMethod To IP + Port + Path Error

Hi,

I need to request a URL like this;

http://123.456.78.9:8026/page.asp

The request works fine in a web browser.

I use HttpClient to do this as follows;

PostMethod postMethod = new PostMethod("/page.asp");

HttpClient httpClient = new HttpClient();
httpClient.startSession("123.456.78.9", 8026);
httpClient.executeMethod(postMethod);
httpClient.endSession();

System.out.println(postMethod.getResponseBodyAsString());

I get a NoRouteToHostException for this which I find strange.

Help appreciated,

Ali


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>