You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2023/10/20 15:56:00 UTC
[jira] [Updated] (CAMEL-19723) camel-core - EIP - Allow convert for the header
[ https://issues.apache.org/jira/browse/CAMEL-19723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-19723:
--------------------------------
Summary: camel-core - EIP - Allow convert for the header (was: Allow convert for the header)
> camel-core - EIP - Allow convert for the header
> -----------------------------------------------
>
> Key: CAMEL-19723
> URL: https://issues.apache.org/jira/browse/CAMEL-19723
> Project: Camel
> Issue Type: Wish
> Reporter: Tuomas Palenius
> Priority: Minor
>
> There's quite often need to convert the header to some format. Now we use the following method:
> {code:java}
> .setBody().header("myheader")
> .convertBodyTo(String.class)
> .setHeader("myheader").body()
> {code}
> This adds verbosity to the code and could be done more elegantly if there was own method for this. Similar to
> {code:java}
> .convertBodyTo(class){code}
> but for the header. Example:
> {code:java}
> .convertHeaderTo("myheader", String.class){code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)