Reputation: 1909
I'm calling an endpoint where the information I need is returned in the response header (https://keycloak.discourse.group/t/rest-api-create-user-no-user-identifier-in-response/1964/4). How do I retrieve this information if I use Quarkus REST client (https://quarkus.io/guides/rest-client)?
I understand that I can use @ClientHeaderParam
or @HeaderParam
for putting header in the response. What I want is the opposite.
Upvotes: 1
Views: 3524
Reputation: 5562
You RestClient method should return a JAX-RS Response
object instead of the payload so you can access the header from it via getHeaders
.
Upvotes: 6