0
And how do I receive data from a server REST passing an authorisation of the type basic in the header?
I’ve tried so many ways and it doesn’t work, and when I test Postman, works normally.
I’ve tried it simple:
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 didn’t work out.