Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Client Headers passing conveniently #1593

Open
lasteris opened this issue Nov 13, 2024 · 1 comment
Open

Support Client Headers passing conveniently #1593

lasteris opened this issue Nov 13, 2024 · 1 comment

Comments

@lasteris
Copy link

For now, we have found the way below to pass headers:

        Map<String, List<String>> headers = Map.of("Authorization", List.of("Bearer ..."));
        requestContext.put(Message.PROTOCOL_HEADERS, headers);

But it would be cool, if we have method to pass headers as much convenient as we're doing in Quarkus Rest/Quarkus RestClient.
From application.properties, if it is fair for all requests.
From @Header/@ClientHeader or something annotation, if we need to do it per request.

Also, for Bearer Authorization, maybe worth to do as Quarkus CXF dealing with basic auth:

quarkus.cxf.client.basicAuth.username = bob
quarkus.cxf.client.basicAuth.password = bob234
@lasteris lasteris changed the title Support Client Headers from configuration Support Client Headers conveniently Nov 13, 2024
@lasteris lasteris changed the title Support Client Headers conveniently Support Client Headers passing conveniently Nov 13, 2024
@ppalaga
Copy link
Contributor

ppalaga commented Nov 13, 2024

Citing @maxandersen https://quarkusio.zulipchat.com/#narrow/channel/187030-users/topic/.E2.9C.94.20quarkus-cxf/near/482058993 :

for inspiration: rest client got a bunch of ways to enable custom headers - maybe similar can be applied to cxf clients? https://quarkus.io/guides/rest-client#custom-headers-support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@ppalaga @lasteris and others