Is it possible to create with RestTemplateBuilder an instance of RestTemplate with just the bearer header and token?
I know i can use RestTemplate exchange and set inside the HttpEntity my headers but is it possible to do something like this:
public RestTemplate getRestTemplate(){
RestTemplateBuilder builder = new RestTemplateBuilder();
return builder.build().exchange().setBearerAuth("token here"); //this is not possible
}
Hope you understand what i want to do.