Exactly. I copied/pasted your example from your first thread, and the @GET
slipped in.

You can only send content with @POST or @PUT. So just replace @GET with
@POST in my example and it should work as expected.

Please try it and loop back to us.

Regards,

*Raúl Kripalani*
Enterprise Architect, Open Source Integration specialist, Program
Manager | Apache
Camel Committer
http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
http://blog.raulkr.net | twitter: @raulvk

On Tue, Mar 26, 2013 at 9:23 AM, Christian Müller <
christian.muel...@gmail.com> wrote:

> Hi Romain!
>
> With @GET you cannot send content with your request. This is possible with
> @POST.
>
> Best,
> Christian
>
> On Tue, Mar 26, 2013 at 9:14 AM, jamalissimo <roman.janu...@gmail.com
> >wrote:
>
> > Hi Raul,
> >
> > thanks for quick answer. This looks easy when you are using @GET, but I
> am
> > sending @POST request. If I am right, @POST sends data only in headers. I
> > was thinking about attachments, may be, but here it gets more confusing
> for
> > me :-)
> >
> > Here is my REST implementation:
> >
> >
> ------------------------------------------------------------------------------------
> >         @POST
> >         @Consumes(MediaType.MULTIPART_FORM_DATA)
> >         @Path("/upload")
> >         @Produces(MediaType.APPLICATION_JSON)
> >         public Response uploadFile(
> >                                 @QueryParam("host") String host,
> >                                 @QueryParam("port") String port,
> >                                 @QueryParam("user") String user,
> >                                 @QueryParam("password") String password,
> >                                 @Multipart(value="folderId") String
> > folderId,
> >                                 @Multipart(value="filename") String
> > filename,
> >                                 @Multipart(value="myfile") DataHandler
> > myfile
> >                         ){}
> >
> >
> > Thanks
> >
> > -Br, Roman
> >
> >
> >
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/Upload-file-How-to-pass-InputStream-to-Camel-s-route-tp5729752p5729829.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>

Reply via email to