I need to send HTTP requests from my Quarkus application. Following this guide, I have this RestClient:
@Path("/v1")
@RegisterRestClient
public interface CountriesService {
@GET
@Path("/name/{name}")
Set<Country> getByName(@PathParam String name);
}
In the Path annotation, I can configure the path. But the domain/url to call is defined in a configuration file, according to this paragraph.
# Your configuration properties
org.acme.rest.client.CountriesService/mp-rest/url=https://restcountries.eu/rest #
org.acme.rest.client.CountriesService/mp-rest/scope=javax.inject.Singleton #
In my case, I need this URL to be defined programmatically at runtime, as I receive it as a callback URL.
Is there a way to do that?