commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <>
Subject Re: [httpclient] question
Date Sun, 12 Oct 2003 09:47:58 GMT
Hi Alexey,

Unless I am missing something, there is absolutely nothing you need to
change in your code. 

>         HttpClient client = new HttpClient();
>         HostConfiguration hc = new HostConfiguration();
>         hc.setHost("localhost", 1010);
>         client.setHostConfiguration(hc);
>         PostMethod post = new PostMethod();
>         post.setRequestBody(requestBody);
>         client.executeMethod(post);

HTTP is a request/response oriented protocol by definition. HttpClient
will not return from executeMethod until it gets a response from the
server or a socket read timeout occurs (which is off per default).
Httpclient will continue listening on the socket at until it receives a
response status line and a number of headers from the target server. 


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message