hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Fluent HttpClient
Date Tue, 07 Jun 2011 14:36:48 GMT
On Tue, 2011-06-07 at 15:01 +0300, Xu, Lilu wrote:
> Hi Oleg,
> 
> I am not quite sure about what HTTP parameter means.

Hi Lilu

The concept of HTTP configuration parameters is described here:

http://hc.apache.org/httpcomponents-client-ga/tutorial/html/fundamentals.html#d4e310

Essentially HTTP parameters define runtime behavior of HttpClient and
influence the way it generates and executes request as well as processes
responses.

There are different groups of parameters: request execution, connection,
routing, authentication, state management, HTTP agent and caching.

They are all described in the tutorial. See this section for example:

http://hc.apache.org/httpcomponents-client-ga/tutorial/html/fundamentals.html#d4e349

Some of those parameters are used frequently, some are not. Frequently
used ones we should also be exposed through the 'fluent' API.

In fact HTTP parameters are the ugliest and the most criticized aspect
of the 4.x API. I wish we had done a better job there. It is important
that the problem is alleviated by providing a better API in the 'fluent'
module.


>  I think it means the
> HTTP headers. So I implemented some methods to set and get headers
> "fluently". You may find the example [1] and details [2] in Wiki. I  used
> the jQuery (maybe also other frameworks and APIs do) style to design this
> part. if a method invoked with parameters, then it is a "setter", otherwise
> it is a "getter". Since there are lots of headers, and
> FluentRequest/Response also implements the interface
> HttpUriRequest/HttpResponse which provides the method setHeader(name,value)
> and addHeader(name,value), I think it is not necessary to cover all headers.
> What do you think about it?
> 

I'll review the code and will get back to you.

Cheers

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message