No then you need to use request, which returns an Exchange. And then you can find the OUT or IN message that has the body and headers. You can use hasOut to see there is an OUT message or not. As that can depend a bit if its set as OUT or IN.
Ideally we should have let it return a Message instead but the API was created 9 years ago to return Exchange. On Sat, Mar 4, 2017 at 1:12 AM, Erol <[email protected]> wrote: > Hi > > I'm using spring to call apache camel to generate a file and return the > content of the file so I can force download. Currently my code calls > requestBody, which returns byte[]. I can easily convert this to response > stream and force file download. > > Problem is, can I also access requestBody response headers? Because I'm > using same route component to generate file stream, which also sets > CamelFileName header. Then I can easily use file2 component to write to file > or convert stream to spring response. > > Any ideas if this is possible? I tried passing map of headers hoping it will > update the map, but it doesn't. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/requestBody-to-return-out-headers-tp5794780.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
