Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-1292

Get the embedded HttpClient from decorator HttpClient

    XMLWordPrintableJSON

Details

    Description

      If the developer gets a HttpClient thats extends AbstractHttpClient, he will be able to add interceptor and call all the public get or set method of this class.

      If the HttpClient is a decorator it's not possible to do all of this. The reason is that you cannot get the embedded HttpClient from a decorator client.

      What would be nice, is to have an interface DecoratorClient with the method getEmbeddedHttpClient()
      This interface would be implemented by AutoRetryHttpClient, DecompressingHttpClient and CachingHttpClient.

      This way whenever you chain HttpClient you could still benefit from the methods of AbstractHttpClient/DefaultHttpClient.

      Another possbility would be to have a getBaseHttpClient() and to have it implemented with return this in AbstractHttpClient.

      Attachments

        Activity

          People

            Unassigned Unassigned
            agoubard Anthony Goubard
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified