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

camel-core - SetHeaders EIP some small things we can improve

    XMLWordPrintableJSON

Details

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

    Description

      Lets polish this a bit more

      1) Java DSL to accept vanilla Map

      from("direct:start").setHeaders(Map.of("a", 1, "b", 2, ...)).to("mock:result")

      The current API is Map<String, Expression> which wont allow the above. But we need both kind, but not sure if we can just add Map<String, Object> and have both variants.

      2)
      I assume this method with the Expression as first argument is to force the Java DSL to then use expression builders easily. However maybe add some code comment why its this as we will forget in the future.

      public Type setHeaders(String headerName, Expression expr, Object... headerNamesAndValues) {

      3)
      Add Map.of as example in the documentation

      4)
      Add YAML DSL for the examples where its missing

      Attachments

        Issue Links

          Activity

            People

              klease78 Karen Lease
              davsclaus Claus Ibsen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: