If I have a route that i call from other routes (via "direct") that does an
HTTP POST. How do I get the file that I want to post into the body of the
message before invoking the .to("http://<url>")? 

The problem I'm facing is that, since every "from" in the route gets started
when the route is started, starting this route starts the "direct" as well
as the "file" consumer. I don't want to start a file consumer -- I just want
to shove the contents of the file i want to POST into the message body of
the .to("http://...";). 

     from("direct:post")
          .from("file:<dir>?fileName=<filename>")
          .to("http://<url>")
     .end();

I suppose I could put an inline process that reads a file and sets it to the
body of the exchange. But I would think there is a simpler way? 







--
View this message in context: 
http://camel.465427.n5.nabble.com/Calling-route-via-direct-that-does-an-HTTP-POST-tp5748043.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to