in

Quarkus reactive rest client @HeaderParam("Authorization") not working and how to debug


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?



Source: https://stackoverflow.com/questions/70627326/quarkus-reactive-rest-client-headerparamauthorization-not-working-and-how-t

A game bot written for Lumberjack game at Telegram platform

Input SUM depend on selectbox jquery