Camel: changing stream encoding
apache-camel
Solution
Please have a look at `.convertBodyTo()` - in particular the `charset` argument.
from("direct:foo").
to("http://foo.com/bar.html").
convertBodyTo(String.class, "UTF-8")
to("file:///tmp/bar.html")
Reference: http://camel.apache.org/convertbodyto.html
Problem
I'm receiving data stream from http with that route: ``` from("direct:foo"). to("http://foo.com/bar.html"). to("file:///tmp/bar.html") ``` HTTP stream comes with `Windows-1251` encoding. I'd like to re-code to `UTF-8` on the fly and then store to file. How to do that using standard `camel` way?