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: Pattern for batch file transfers
Date Sun, 18 May 2008 18:14:44 GMT
On Sun, 2008-05-18 at 08:25 -0700, stanlick wrote:
> Thanks brother.  I had looked at that example and was wondering how that send
> technique differed from:
> 
> 		Part[] parts = { new FilePart(f.getName(), new FilePartSource(f)) };
> 		filePost.setRequestEntity(new MultipartRequestEntity(parts,
> filePost.getParams()));
> 
> The FilePartSource appears to stream the request.  Also, I can't quite tell
> how to specify the MIME types for each respective file "part"

http://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/methods/multipart/PartBase.html#setContentType(java.lang.String)


>  nor a way to
> specify separators.  
> 

HttpClient 3.x does not support custom part boundaries. This can be done
with HttpClient 4.0 only

Hope this helps

Oleg


> Peace,
> Scott
> 
> 
> 
> 
> olegk wrote:
> > 
> > On Fri, 2008-05-16 at 09:17 -0700, stanlick wrote:
> >> Greetings -- 
> >> 
> >> I am searching for a generic solution for transferring files between
> >> peers
> >> using HttpClient and FileUpload.  I see a myriad of techniques, but would
> >> really appreciate a solution that:
> >> 
> >> 1) streams in/out (don't want to worry about OutOfMemoryErrors)
> >> 2) imposes no size limits
> >> 3) supports any payload 
> >> 
> > 
> > Please see
> > 
> > http://hc.apache.org/httpclient-3.x/performance.html#Request_Response_entity_streaming
> > 
> > 
> >> Can someone point me in the right direction?  Is HttpClient 4.x the
> >> preferred version?  Is it still beta?
> >> 
> > 
> > HttpClient 4.0 is still ALPHA. So, if HttpClient 3.x works for you,
> > stick to it.
> > 
> > Oleg
> > 
> > 
> > 
> >> Thanks,
> >> Scott
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> > For additional commands, e-mail: httpclient-users-help@hc.apache.org
> > 
> > 
> > 
> 


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