HttpComponents HttpClient
  1. HttpComponents HttpClient
  2. HTTPCLIENT-851

Helper classes for HttpClient : spring-like templates, Gzip interceptor, spring FactoryBean, ...

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 4.0 Beta 2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      HttpClient API is pretty much low-level, and needs some obscure setup (Registry, ..) to target the common use case (sometimes, you don't care about the low level details, you just
      want to fire an http client, and hit a given web resource).

      I have extracted some supporting code out of my application in the hope to make it widely available for others. It is available at :
      http://www.sirika.com/maven2/releases/com/sirika/httpclienthelpers/com.sirika.httpclienthelpers-assembly/0.1/com.sirika.httpclienthelpers-assembly-0.1-all.zip

      It contains :

      • HttpClientTemplate that automatically open/close connections in case of exceptions.It also provides a kind of generic http error handling mechanism.
      • a spring HttpClientFactoryBean (as well as a helper factory class for httpclient) that allows setting up http client for the common use case
      • an InputStreamSourceBody that can be used to create POST entities that are repeatable, wrapping a spring InputStreamSource
      • the code for the GZIP interceptors that are documented as examples on httpclient website.

      The code is still not tested (just extracted that logic from my application), needs some polishing, and a few things like the error handling mechanism still need more thought. But I feel it can be helpful to others.
      So, my question is : can we create a kind of -contrib project for httpclient, that allows people to share their helpers with the community ?

      the code is currently available under under apache v2 license, but I'm willing to adopt whatever licensing/copyright issues that would help to make this available.

      Oh, also, if you want to see the code in action, here's an example of a REST client that uses it :
      http://www.sirika.com/maven2/releases/com/sirika/pymager/pymager-java-client-assembly/0.11/pymager-java-client-assembly-0.11-all.zip
      (which is another project born out of extracted code from my application, that I'm trying to push as open source ; I just lack time to handle the community / website / etc issues).

      Sami Dalouche

        Activity

        Oleg Kalnichevski made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Oleg Kalnichevski made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s Future [ 12312298 ]
        Resolution Won't Fix [ 2 ]
        Mark Thomas made changes -
        Workflow jira [ 12580818 ] Default workflow, editable Closed status [ 12606504 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12557838 ] jira [ 12580818 ]
        Mark Thomas made changes -
        Workflow jira [ 12463680 ] Default workflow, editable Closed status [ 12557838 ]
        Oleg Kalnichevski made changes -
        Field Original Value New Value
        Fix Version/s Future [ 12312298 ]
        Sami Dalouche created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Sami Dalouche
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development