hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guri <guri.mailingli...@gmail.com>
Subject Re: Sending a multipart message with http client nio causes the UnsupportedOperationException exception
Date Thu, 29 Sep 2011 20:17:18 GMT

Hi Oleg,

Can you please suggest something similar to below for streaming large
messages sent over wire to NIO server using HttpClient 3x ? Can't move to 4x
presently, hence need to figure out a way where i can send the message in
parts, without loading same into memory.


thanks
Guri



olegk wrote:
> 
> On Wed, 2010-05-26 at 05:21 -0700, franck.mosse wrote:
>> 
>> 
>> olegk wrote:
>> > 
>> > 
>> >> Hi olekg,
>> >> 
>> >> Using a  buffer content in memory will not be a good solution for me
>> as i
>> >> have to transfert large amount of data like videos and i don't want to
>> >> load
>> >> the full video in memory.
>> >> 
>> >> Is it planned to include the support of multipart messages and stream
>> >> body
>> >> in the httpcore nio package ?
>> >> Franck.
>> > 
>> > HttpCore NIO fully supports content streaming. There are presently no
>> > plans to develop multipart library based on NIO.
>> > 
>> > Oleg
>> > 
>> > 
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>> > For additional commands, e-mail: httpclient-users-help@hc.apache.org
>> > 
>> > 
>> > 
>> 
>> May be i am missing something in the api because i am a newbie on nio.
>> Can you tell me where to find an example showing the streaming of large
>> amount of data using the http nio ?
> 
> http://hc.apache.org/httpcomponents-core-4.0.1/tutorial/html/nio.html#d0e1632
> 
> 
>> In fact to be more clear on my need, i would like to send a multipart
>> message made of some string body and an input stream body that contains a
>> video. In this case, i expected to find a NMultipartEntity in the api the
>> same way as NByteArrayEntity and others...
> 
> HC is not a commercial product. It is a community driven project. The
> overwhelming majority of code in the project was contributed by
> individual contributors. NMultipartEntity is not there because nobody
> contributed it. 
> 
>> May be there is an other way to do that but i don't know... Do you have
>> any
>> sample on that ?
> 
> I already mentioned blocking I/O compatibility protocol handlers in my
> previous message. While content buffering would not be a good idea in
> your case, you could still use throttling protocol handler described
> here:
> 
> http://hc.apache.org/httpcomponents-core-4.0.1/tutorial/html/nio.html#d0e2107 
> 
> Oleg
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 
> 
> 


-----


Cheers,
Guri :) 
-- 
View this message in context: http://old.nabble.com/Sending-a-multipart-message-with-http-client-nio-causes-the-UnsupportedOperationException-exception-tp28669483p32552923.html
Sent from the HttpClient-User mailing list archive at Nabble.com.


---------------------------------------------------------------------
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