hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: HttpClient / Core 4.0 question
Date Thu, 22 May 2008 17:48:18 GMT
Vibhav Sharma wrote:
> Hi,
> 
> I have used HttpClient 3.x previously. It did not have the ability to do 
> the following.
> 
>    * Client makes a chunked multipart request to server.
>    * Server responds with a chunked response.
>        * Client sends more data as part of the same request.
>        * Server responds with more data in the same response.
>    * till Server or Client closes connection.
> 
> Basically, treat it like a connection rather than just a 
> request/response pair.
> 
> This is typically not how http works, but as far as I understand, the 
> reference allows it. Also, in my particular case, there is no need for 
> any cookie management etc. So I am supposing I'll be using HttpCore.
> I have as yet not taken a look at it and will be doing as soon as 
> possible. But may I ask whether HttpCore, now, covers such a scenario. 
> (Had to implement/hack this completely last time :) )
> 


Hi Vibhav (I hope I got your first name right)

HTTP is a request / response oriented protocol, so what you are trying 
to do can certainly be considered as an abuse of the protocol. Having 
said that, HTTP gets abused in so many different ways these days, so I 
guess it is just another way.

HttpCore NIO is capable of writing and reading data from the same 
connection in a full duplex mode. Reading and writing streams are 
completely independent. One can easily pipeline several requests before 
getting the first response. HttpCore NIO can also be used for the 
scenario you described, but you will have to implement your own protocol 
handler, which is not an easy thing to do.

Hope this helps

Oleg

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message