Hi Oleg,

>    Date: 2005-01-16T15:06:31
>    Editor: OlegKalnichevski
>    Wiki: Jakarta-HttpClient Wiki
>    Page: HttpClientApiRedesign
>    URL: http://wiki.apache.org/jakarta-httpclient/HttpClientApiRedesign
> [...]
> A better approach may be to introduce common aspects shared by all 
> types of HTTP methods as a set of filters. HTTP method executor 
> would be able to apply a number of preprocessing filters to every 
> request prior to sending it to the target server and a number of 
> postprocessing filters to every response received. This design would
> allow for flexible introduction of crosscutting aspects to all 
> standard types of methods as well as custom ones without class 
> extension. For instance, filters may be employed to generate 'Host',
> 'Agent', 'Cookie' request headers and to extract cookies set by the 
> target server from 'Set-Cookie' response headers. Similar approach 
> may be used on the server side. This design would enable decoupling 
> of client- and server-side aspects from the HttpRequest and 
> HttpResponse primitives, thus making them more reusable.

That sounds cool. And it will make http-cookie, among others, really
pluggable. So the primary purpose of the method implementations becomes
handling of the entity that may be enclosed. And likewise for the
response implementation on the server side. Can we find a way to
offload entity handling into separate classes that are re-usable on
both sides?

cheers,
  Roland

Reply via email to