Reputation: 21
I'm setting header value as bean like this , but not working.
.setHeader("Authorization", "Basic "+authCache.getAuthCache().getClintToken());
Upvotes: 0
Views: 2453
Reputation: 55550
The easiest is probably to add a method on your RouteBuilder
class where you define the route where you build that constant value.
public String clientToken() {
return "Basic " + authCache.getAuthCache().getClientToken();
}
And then call this method from your Camel route
setHeader("Authorization", method(this, "clientToken"))
Upvotes: 1
Reputation: 27078
.setHeader("Authorization", constant("Basic "+authCache.getAuthCache().getClientToken()));
Try this
Upvotes: 0