Oleg wrote:

> Marko wrote:
> > I noticed that one problem with this approach was that I'm not able to
> > intercept redirected requests.
> > HC seems to be using DefaultRequestDirector for executing the
> > redirected requests instead of the custom executor.
> >
> > Does using the new executions chain APIs solve this issue?
>
> It should.

ok. I did some experimenting with this using HC 4.3b1, and it does
appear to work.
My proto code is available here:

https://github.com/marko-asplund/tech-protos/blob/master/hc-proto/src/main/java/fi/markoa/proto/hc/RequestInterceptionDemo.java

Is this the correct way to use the new API?

Are any big changes expected in HC 4.3 beta before the final release?
Any estimates for HC 4.3 final release date?

As a side note, try-with-resources doesn't seem to work well with a
set of related resources some of which implement AutoCloseable and
some that don't. For example it doesn't seem to be practical to use
try-with-resources with CloseableHttpClient, CloseableHttpResponse and
HttpEntity, because if the first two would be closed automatically
while the last one would be closed in a finally block, the resources
would be closed in an incorrect order.

marko

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

Reply via email to