Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
4.3.0
-
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
- is caused by
-
CAMEL-20056 camel-core - SetHeaders EIP to set multiple headers in a single EIP
- Resolved
- links to