Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-2569

RestClient does not propogate incoming headers with inherited Interface

XMLWordPrintable

      the following RestClient does not propogate incoming headers:

          @RegisterRestClient(baseUri = "http://localhost:8180/accounts")
          @RegisterClientHeaders
          public interface AccountClient extends AccountResource { }
      

      when overriding the Accountresource.getAccount() method, it does:

          @Override
          @GET
          @Produces(value = {MediaType.APPLICATION_JSON})
          @Path(value = "{id}")
          public Response getAccount(@PathParam(value = "id") Long accountId);
      

      I assume the cause is in ClientHeadersRequestFilter.java. The method is not declared in the actual rest-client interface.

      A possible solution could be a new static helper method:
      ClientRequestContextUtils.getDeclaring(ClientRequestContext requestContext);

            rhn-support-asoldano Alessio Soldano
            dabloem Duncan Bloem (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: