hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tov Are Jacobsen" <m...@tovare.com>
Subject Re: [ANNOUNCEMENT] HttpClient 4.0 is nearing API freeze / API review request
Date Sat, 24 May 2008 22:13:58 GMT
Great work guys !

I have one small request. When hitting the API without reading your sample
code, it's a bit hard to get started using the API.

Consider the most common use-case of doing a GET request.

It's pretty natural to look at the org.apache.http.client , where my first
guess was to find a client I could use. It also says in the docs that it is
the entry point for the module. The only concrete class I find there is
AuthState. which is not what I'm looking for, the HttpClient interface looks
promising, the methods there don't look easy at all. Drilling down further I
find default HttpClient, which again doens't look that easy to use (the
first time you look at it).

The actual use of the API is dead easy however.

1. Create and configure the client.

 DefaultHttpClient client = *new* DefaultHttpClient();

2. execute a method

 HttpGet myget = new HttpGet("http://example.org");
 HttpResponse response = client.execute(myget)

3. consume the content by reading the stream or consuming the content.

My request is the following:

 1. Move basic-use default classes to the main client package.
 2. Write a basic use case in the API docs.
 3. Stress the importance of consuming the content in the docs.
 4. Is there some better place for AuthState ?

Thanks !

Regards,

Tov Are Jacobsen


On Sat, May 24, 2008 at 1:03 PM, Oleg Kalnichevski <olegk@apache.org> wrote:

> Folks
>
> The redesign of HttpClient is now complete. All known problems with the
> old (3.x) API and architecture limitations have been resolved. All
> features planned for the 4.0 release are now in place.
>
> Due to the release schedule of one of our upstream projects we will have
> to freeze the 4.0 API rather sooner than later. The next release is
> likely to be BETA1 not ALPHA5, as initially planned.
>
> If your project depends on HttpClient, this is the time to check the new
> API out and let us know what you think. If we do not get more feedback /
> change requests, the current SVN snapshot is very likely to be the API
> HttpClient 4.0 will ship with. If you ever wanted to have something
> fixed or improved in HttpClient API, this is pretty much the last chance
> to ask for it.
>
> The current SVN snapshot can be found here:
>
> http://people.apache.org/~olegk/4.0-API-review/<http://people.apache.org/%7Eolegk/4.0-API-review/>
>
> Oleg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message