Hi Odi, Thanks for your quick reply. I have already succeed uploading file using MultipartPostMethod. I have to download the file back for future reference. I have already tried downloading the file both using GetMethod and PostMethod, but again I get the whole response file (not the content). Thanks. Quent
Ortwin_Gl�ck <[EMAIL PROTECTED]> wrote: Quent, I guess you are trying to make a file upload with Multipart MIME encoded attachments. HttpClient can not parse such responses, but it can send such requests. Consider using the Commons FileUpload component for your problem. AFAIK the FileUpload guys have a release pending and the current code is stable. Odi Querent wrote: > Hi.. > I am new to httpclient. > I am developing a program that download a file. > I've got the response using : > InputStream bodyStream = postMethod.getResponseBodyAsStream(); > > When I write the bodyStream to a file, it write the whole response things. > (I only want to save the file). > > Is there anyway I could get only the content of the file ? > > I attached my downloaded file. Unfortunately attachments > 100 KB get stripped by the list. > many thanks in advance. > > Cheers, > > quent -- _________________________________________________________________ NOSE applied intelligence ag [www] http://www.nose.ch ortwin gl�ck [email] [EMAIL PROTECTED] hardturmstrasse 171 [pgp key] 0x81CF3416 8005 zurich [office] +41-1-277 57 35 switzerland [fax] +41-1-277 57 12 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------- Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month!
