Ad 1)
With path parameter I mean {name} in your example (or {id} and {somePathParam}
in the examples from my first mail).
Ad 2)
Does this mean that if I use toD with the http-component, optimization will
always be used no mather how I define the component path (e.g.
toD(http("dummyHost:8181/dummySystem${header.CamelHttpPath}"))?
Ad 3)
When debugging the code, I found out the header is used in HttpHelper here:
https://github.com/apache/camel/blob/camel-3.4.x/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpHelper.java#L264
which is called from HttpProducer:
https://github.com/apache/camel/blob/camel-3.4.x/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java#L449
The code is a little bit different in the latest Camel version (compared to
3.4) but the behaviour seems the same.
The reason I'm asking about CamelHttpRawQuery is that I can't find any
information about it when looking at the http-component documentation.
I just found the following information about CamelHttpRawQuery in the
netty-http-component documentation:
"Any query parameters, such as foo=bar&beer=yes. Stored in the raw form, as
they arrived to the consumer (i.e. before URL decoding)."
I suppose the header works the same for http-component. Could this be a miss in
the documentation?
Given that CamelHttpRawQuery uses raw form, it feels like the following code
(which is used as a workaround in one of the alternatives in my first mail)
should be avoided:
.setHeader(Exchange.HTTP_RAW_QUERY, header(Exchange.HTTP_QUERY))
as I assume it will lead to problems when using a URL decoded value to set a
header intended for a raw value.