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

RESTEasy Reactive client: add User-Agent #22214

Closed
FroMage opened this issue Dec 14, 2021 · 5 comments · Fixed by #22236
Closed

RESTEasy Reactive client: add User-Agent #22214

FroMage opened this issue Dec 14, 2021 · 5 comments · Fixed by #22236
Labels
Milestone

Comments

@FroMage
Copy link
Member

FroMage commented Dec 14, 2021

Describe the bug

Most websites straight-up refuse REST calls without a User-Agent. GitHub's API does. We should probably set one by default, otherwise users have to do:

@ClientHeaderParam(name = "User-Agent", value = "MP REST") 
@RegisterRestClient
@Path("/")
public interface GithubClient {
}

And the problem is that if this value is missing, all calls will fail with an exception which does not log the GitHub response, so it takes quite a while to figure out why it fails (see #22213).

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@FroMage FroMage added the kind/bug Something isn't working label Dec 14, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Dec 14, 2021

/cc @geoand, @stuartwdouglas

@geoand
Copy link
Contributor

geoand commented Dec 14, 2021

How about also adding the ability to do this in config?

@sberyozkin
Copy link
Member

By the way @FroMage, this will also work with the oidc-token-propagation-reactive (filter) once it is available, will open a sep issue

@geoand
Copy link
Contributor

geoand commented Dec 15, 2021

#22236 is what I have in mind

geoand added a commit that referenced this issue Dec 16, 2021
Add the ability to configure HTTP headers for REST Client Reactive
@quarkus-bot quarkus-bot bot added this to the 2.7 - main milestone Dec 16, 2021
@FroMage
Copy link
Member Author

FroMage commented Dec 20, 2021

Hang on, this doesn't appear to add a user-agent… Ah, it's #22228, fine!

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

Successfully merging a pull request may close this issue.

3 participants