Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-19723

camel-core - EIP - Allow convert for the header

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.3.0
    • camel-core, eip
    • None
    • Unknown

    Description

      There's quite often need to convert the header to some format. Now we use the following method:

      .setBody().header("myheader")
      .convertBodyTo(String.class)
      .setHeader("myheader").body()
      

      This adds verbosity to the code and could be done more elegantly if there was own method for this. Similar to 

      .convertBodyTo(class)

       but for the header. Example:

      .convertHeaderTo("myheader", String.class)

       

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              devituomas Tuomas Palenius
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: