Reputation: 17617
I'm trying to get in touch with Apache Camel, but it's behaviour is so far confusing.
For example, I'm using platformHttp and declare a route under which my endpoint should be available.
from(platformHttp("/api/test"))
.to("https:google.com?bridgeEndpoint=true")
.setBody(simple("${body}"));
Calling it will call the sub-route https://google.com/api/test instead of https://google.com
Why is that and how would I prevent Apache Camel from taking the route and appending it to the called route in my .to() ?
Upvotes: 0
Views: 441
Reputation: 1267
To prevent the HTTP exchange headers (I.e ones with names prefixed with CamelHttp
) being propagated from the platform-http
endpoint to the http
endpoint, you can remove them like this.
from(platformHttp("/api/test"))
.removeHeaders("CamelHttp*")
.to("https:google.com?bridgeEndpoint=true")
.setBody(simple("${body}"));
There's an FAQ article for this topic on the Camel website:
Upvotes: 2