Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
from(...).removeHeaders("*", "myheader1", "myheadermyheader2").to("smtp://....")

To do this (a similar thing) in XML DSL you simply do:

Code Block
xml
xml
<route>
  <from uri="..."/>
  <removeHeaders pattern="*" excludePattern="myHeader1,myHeader2header1|header2"/>
  <to uri="smtp://..."/>
</route>
Tip

At present, the excludePattern only supports one header name (which can be include wild cards or regular expressions). We tackle this limitation with CAMEL-6445.

Again to remove only Camel headers but no other transport headers:

...