-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Make it possible to set the base URL of the REST Client when actually performing the call #43316
Comments
geoand
changed the title
Make it possible to set URL per call in Quarkus RestClient
Make it possible to set the base URL of the REST Client when actually performing the call
Sep 16, 2024
/cc @cescoffier (rest-client) |
#43331 introduces this capability and should be available in |
@geoand Holy s**t. You are simply amazing. Thank you. |
🙏🏽 |
geoand
added a commit
that referenced
this issue
Sep 17, 2024
Introduce per invocation override of REST Client's base URL
melloware
pushed a commit
to melloware/quarkus
that referenced
this issue
Sep 17, 2024
This is done by introducing the @url annotation that can be placed on a method parameter. When this parameter is not null, it will be used as the base URL for the specific invocation Closes: quarkusio#43316
melloware
pushed a commit
to melloware/quarkus
that referenced
this issue
Sep 17, 2024
This is done by introducing the @url annotation that can be placed on a method parameter. When this parameter is not null, it will be used as the base URL for the specific invocation Closes: quarkusio#43316
danielsoro
pushed a commit
to danielsoro/quarkus
that referenced
this issue
Sep 20, 2024
This is done by introducing the @url annotation that can be placed on a method parameter. When this parameter is not null, it will be used as the base URL for the specific invocation Closes: quarkusio#43316
bschuhmann
pushed a commit
to bschuhmann/quarkus
that referenced
this issue
Nov 16, 2024
This is done by introducing the @url annotation that can be placed on a method parameter. When this parameter is not null, it will be used as the base URL for the specific invocation Closes: quarkusio#43316
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
We have the case, where we need to change URL per request.
Mostly that's because we are trying to obtain URL from some other remote API.
For now, we have to write something like that:
But surely, we want just use Quarkus RestClient abstraction via declarative API, or QuarkusRestClientBuilder.
Implementation ideas
Most likely i see this like such things done in Retrofit (@url annotation), or special processing of Url/Uri type (like in HttpExchange in Spring Boot. But you know better :
The text was updated successfully, but these errors were encountered: