In my Quarkus app, I need to make ah http request to another server, in which the Authorization
value needs to be passed.
I am using the reactive rest client and tried to use the @HeaderParam("Authorization")
to customize the header:
@Path("/api")
@ApplicationScoped
@RegisterRestClient
@RegisterProvider(value = RestClientExceptionMapper.class)
public interface InternalService {
@POST
@Path("/xxx")
@Produces({APPLICATION_JSON})
@Consumes({APPLICATION_JSON})
Uni<List<String>> Abc(
@HeaderParam("Authorization") String bearerVal,
List<String> values);
}
It does not work.
On the client side, I can confirm that the bearerVal
is correctly set Bearer xxx
.
On the server side, I can confirm that the request is received, but the Authorization
header value is not set.
I wonder what is missing here? How can I debug the header values used by the the underlying http client?