[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1806?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oleg Kalnichevski resolved HTTPCLIENT-1806.
-------------------------------------------
       Resolution: Fixed
    Fix Version/s:     (was: 5.0)
                   5.0 Alpha2

Baosen,

Please have a look at the new exec request interceptor APIs in SVN trunk. I 
hope this is what you actually want.

Classic (blocking)
https://github.com/apache/httpclient/blob/trunk/httpclient5/src/examples/org/apache/hc/client5/http/examples/ClientInterceptors.java

Async
https://github.com/apache/httpclient/blob/trunk/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientInterceptors.java

Oleg

> Add a route inteceptor
> ----------------------
>
>                 Key: HTTPCLIENT-1806
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1806
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient (async), HttpClient (classic)
>            Reporter: Baosen Cui
>            Priority: Minor
>             Fix For: 5.0 Alpha2
>
>
> I had meet a problem that I need to log the time cost by  method 
> “establishRoute”( in httpclient ).
> Since there seems nothing to support, I wrote a interceptor into HttpCore 
> coping the structure of “HttpProcessor"
> Would this be accepted? Or there has already something alike?
> @ThreadSafe // provided injected dependencies are immutable
> public final class ImmutableRouteProcessor implements RouteProcessor {
> ...
> }
> public interface PostRouteInterceptor {
>   void postProcess(final HttpRequest request, final HttpContext context);
> }
> public interface PreRouteInterceptor {
>   void preProcess(final HttpRequest request, final HttpContext context);
> }
> public interface RouteProcessor extends PreRouteInterceptor, 
> PostRouteInterceptor {
> }



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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

Reply via email to