https://issues.apache.org/activemq/browse/CAMEL-2833

Patch included.

On Sat, Jun 19, 2010 at 2:46 AM, Claus Ibsen <claus.ib...@gmail.com> wrote:

> On Sat, Jun 19, 2010 at 9:58 AM, Willem Jiang <willem.ji...@gmail.com>
> wrote:
> > Hi,
> >
> > I don't think current camel-http support the multipart/form-data out of
> box,
> > as the HttpProducer will try to turn message body into an input stream if
> > the http method is POST.
> >
>
> Ah yeah we should most likely support FileRequestEntity and
> InputStreamRequestEntity out of the box.
>
> We should most likely do something like
>
> If body is file based -> FileRequestEntity
> If body is String based -> StringRequestEntity (only check body
> instanceof String, to avoid type converting as anything can be
> converted into String)
> Else fallback to the InputStreamRequestEntity
>
> I wonder for the file based that people may want to read the content
> of the file and send that instead?
> For that they can use the .convertBodyTo(String.class) in the DSL
> before hitting the to http.
> But we could also offer an option to set which request entity
> preferred, just as we can do that with JMS.
>
>
>
>
>

Reply via email to