I am trying to get a header value from the config into the Rest(easy) client using the @ClientHeaderParam
annotation as described here https://quarkus.io/guides/rest-client-reactive#custom-headers-support, unfortunately it does not work out. The value is sent as-is, rather than replaced with the corresponding config property
Here is roughly what I am doing
@RegisterRestClient
@ClientHeaderParam(name = "Key", value = "${api-key}")
public interface MyClient {
@POST
@Path("/api")
@Consumes(MediaType.APPLICATION_OCTET_STREAM)
@Produces(MediaType.APPLICATION_JSON)
Response call(InputStream image);
}
When I invoke the call
method and check the request, I see that the Key
header has ${api-key}
as value, and not the value I have in application.properties
for api-key.
Thanks in advance.