hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vijay <rnvi...@gmail.com>
Subject Re: Parsing Multipart
Date Mon, 13 Dec 2004 17:12:19 GMT
I'm currently using httpclient to post the multipart data to an URL
and read the multipart response back. JavaMail doesn't support
http/https protocol requests, correct?

I saw the warning message on logs for using String. Thanks. I will use
getResponseAsStream().

Thanks
Vijay

On Mon, 13 Dec 2004 17:57:08 +0100, Ortwin Gl├╝ck <ortwin.glueck@nose.ch> wrote:
> 
> 
> Vijay wrote:
> > I am reading the multipart messge using code as follows:
> >
> > method.getResponseBodyAsString()
> >
> > What I get is a BIG string, with multiple parts( each part has
> > boundary, content-disposition type and name).
> 
> If your String is large, use of getResponseBodyAsString() is strongly
> discouraged. Please use getResponseAsStream().
> 
> > Is there any smart way
> > of parsing this string into each part and put it into hashtable?
> > (Currently I can only think of using String operations to break the
> > BIGstring into multiple parts. But the problem is, sometimes I dont
> > know what the content disposition/part name is going to be)
> >
> >
> > Thanks
> > Vijay
> 
> HttpClient does not handle Multipart-MIME parsing. You could use the
> JavaMail library for that:
> 
> http://java.sun.com/products/javamail/
> 
>    -og
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org
> 
>

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


Mime
View raw message