And how do I get the data from a REST server passing a basic authorization in the header?
I have tried in many ways and it does not work, and when I test in postman , it works normally.
I have tried the simple way:
from(URL_API_FBITS + "categorias?hierarquia=false")
.setHeader("Authorization", simple("Basic" + TOKEN))
.log("${body}").to("file:saida?noop=true");
Converting to JSON:
from(URL_API_FBITS + "categorias?hierarquia=false")
.marshal().json(JsonLibrary.Jackson)
.setHeader(CONTENT_TYPE, simple(APPLICATION_JSON))
.setHeader("Authorization", simple("Basic " + TOKEN))
.log("${body}").to("file:saida?noop=true");
And it still did not work out.