You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Florent Georges <li...@fgeorges.org> on 2009/12/22 16:59:41 UTC

Multipart response with 4.1

  Hi,

  I have to support multipart/* response using HTTP Core and HTTP
Client 4.1.  For now, I use HttpResponse.getEntity().getContent()
to get the response stream, but so I have to parse the multipart
entity "by hand" (parse the headers for each part, as well as its
content itself).

  Is there any support for multipart responses?  I looked for in
the documentation, but did not find anything.

  Regards,

-- 
Florent Georges
http://www.fgeorges.org/




















      


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


Re: Multipart response with 4.1

Posted by Eric Lentz <ia...@gmail.com>.
Maybe this would be of help:
http://www.mail-archive.com/httpclient-user@jakarta.apache.org/msg04629.html


On Tue, Dec 22, 2009 at 10:59 AM, Florent Georges <li...@fgeorges.org>wrote:

>  Hi,
>
>  I have to support multipart/* response using HTTP Core and HTTP
> Client 4.1.  For now, I use HttpResponse.getEntity().getContent()
> to get the response stream, but so I have to parse the multipart
> entity "by hand" (parse the headers for each part, as well as its
> content itself).
>
>  Is there any support for multipart responses?  I looked for in
> the documentation, but did not find anything.
>
>  Regards,
>
> --
> Florent Georges
> http://www.fgeorges.org/
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>

Re: Multipart response with 4.1

Posted by Florent Georges <li...@fgeorges.org>.
Oleg Kalnichevski wrote:

> HttpMime simply reduces the amount of code required to 
> generate MIME multipart requests.

  Sounds good :-)  I'll keep an eye on both APIs while designing the code, to choose the more adapted one.  For what I've seen, that's only for multipart requests (not multipart responses), am I right?

  Regards,

-- 
Florent Georges
http://www.fgeorges.org/






















      


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


Re: Multipart response with 4.1

Posted by Oleg Kalnichevski <ol...@apache.org>.
Florent Georges wrote:
> Oleg Kalnichevski wrote:
>> Florent Georges wrote:
> 
>   Hi,
> 
>>>   Is there any support for multipart responses?
> 
>> Take a look at Apache mime4j
> 
>> http://james.apache.org/mime4j/
>> http://james.apache.org/mime4j/usage.html
>> http://james.apache.org/mime4j/samples.html
> 
>   Thanks Oleg.  By the way, I see this project references the
> httpmime library, from the project HTTP Components.  The library
> page says it enhances mime4j, but I didn't find any info about
> when it is useful to use httpmime instead of (or in addition to?)
> mime4j.
> 

HttpMime is an extension of mime4j that mainly provides HTTP specific 
aspects such as a browser compatibility mode for the Multipart message 
body. One can use mime4j directly to generate and consume MIME coded 
content. HttpMime simply reduces the amount of code required to generate 
MIME multipart requests.

Oleg

>   Maybe I missed the info?
> 
>   Thanks for the links, regards,
> 


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


Re: Multipart response with 4.1

Posted by Florent Georges <li...@fgeorges.org>.
Oleg Kalnichevski wrote:
> Florent Georges wrote:

  Hi,

> >   Is there any support for multipart responses?

> Take a look at Apache mime4j

> http://james.apache.org/mime4j/
> http://james.apache.org/mime4j/usage.html
> http://james.apache.org/mime4j/samples.html

  Thanks Oleg.  By the way, I see this project references the
httpmime library, from the project HTTP Components.  The library
page says it enhances mime4j, but I didn't find any info about
when it is useful to use httpmime instead of (or in addition to?)
mime4j.

  Maybe I missed the info?

  Thanks for the links, regards,

-- 
Florent Georges
http://www..fgeorges.org/






















      


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


Re: Multipart response with 4.1

Posted by Oleg Kalnichevski <ol...@apache.org>.
Florent Georges wrote:
>   Hi,
> 
>   I have to support multipart/* response using HTTP Core and HTTP
> Client 4.1.  For now, I use HttpResponse.getEntity().getContent()
> to get the response stream, but so I have to parse the multipart
> entity "by hand" (parse the headers for each part, as well as its
> content itself).
> 
>   Is there any support for multipart responses?  I looked for in
> the documentation, but did not find anything.
> 
>   Regards,
> 

Florent

Take a look at Apache mime4j

http://james.apache.org/mime4j/
http://james.apache.org/mime4j/usage.html
http://james.apache.org/mime4j/samples.html

Oleg

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