On Wed, 2011-08-03 at 10:16 -0500, Jon Brisbin wrote:
> I'm building a proof of concept application that uses the async HTTP client 
> and I've hit a snag w.r.t. the API. I'm streaming content using PUT and I 
> don't have any content to pass to the constructor. Is it safe to pass null 
> here?

No, it is not. Why would you want to issue a PUT request without any
content in the first place?

>  I need to send content in chunks because it's impossible to do it by loading 
> the (possibly huge) files into a byte[] in memory. 
> 
> How do I do streaming with a PUT using the async HTTP client? 
> 

You can either use the ZeroCopyPut request producer if the request
content is stored in a file or builds a custom implementation of
HttpAsyncRequestProducer that generates bits of content dynamically and
writes them out using the #produceContent method.

Hope this helps

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to