在我的 Quarkus 应用程序中,我需要向另一台服务器发出 ah http 请求,其中Authorization
需要传递值。
我正在使用反应式休息客户端并尝试使用@HeaderParam("Authorization")
自定义标头:
@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);
}
这没用。
在客户端,我可以确认bearerVal
设置正确Bearer xxx
。
在服务器端,我可以确认收到了请求,但是Authorization
没有设置 header 值。
我想知道这里缺少什么?如何调试底层 http 客户端使用的标头值?