commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@bluewin.ch>
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. 

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message