title: Quarkus RestClient get response from redirect
body: <p>I'm using <a href="https://quarkus.io/guides/rest-client" rel="nofollow noreferrer">Quarkus Rest Client</a> to perform a GET request to an external API service. This service, however, does not directly return the resource (XML) I need to receive, but it performs a redirect to another API service which returns the resource.</p>
  <p>When I try to navigate to the path which asks the API service for the resource (i.e. localhost:8080/hello) I get redirected to the page with the resource instead of receiving and processing it.</p>
  <p>Putting a breakpoint after the request, shows that the part of the code after the request is never reached.
  Here is the code of the endpoint:</p>
  <pre><code>@Path(&quot;/hello&quot;)
  public class GreetingResource {
  
    @Inject
    @RestClient
    MyService myService;
  
    @GET
    @Produces(MediaType.TEXT_PLAIN)
    public String hello() {
      myService.performGet();
      return &quot;you are here&quot;; // breakpoint here, it is never reached
    }
  }
  </code></pre>
  <p>And here is the code of MyService:</p>
  <pre><code>@Path(&quot;/..&quot;)
  @RegisterRestClient(configKey=&quot;key&quot;)
  public interface MyService {
  
    @GET
    @Path(&quot;/..&quot;)
    @Produces(MediaType.TEXT_XML)
    String performGet(@QueryParam(&quot;c&quot;) String c, @QueryParam(&quot;d&quot;) String d);
  }
  </code></pre>
  <p>I have tried to add the configuration <code>key/mp-rest/followRedirects=true</code>, but I still get the same problem. Also, with a path without redirects, everything works fine.</p>
  <p>Using the native HttpURLConnection also works fine, but, since I am using Quarkus, I would like to use its features instead.</p>