Re: Intercepting and responding to requests on client-side

2013-06-03 Thread Oleg Kalnichevski
On Mon, 2013-06-03 at 00:10 +0300, Marko Asplund wrote: 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

Re: Intercepting and responding to requests on client-side

2013-06-02 Thread Marko Asplund
Oleg wrote: Please upgrade to 4.3 and have a look at the new execution chain APIs. You can use the caching exec as an example of how HttpClient can be made to respond with a response without hitting the target server. thanks Oleg! I did some experimenting earlier with HC 4.2 using the

Re: Intercepting and responding to requests on client-side

2013-06-02 Thread Oleg Kalnichevski
On Sun, 2013-06-02 at 11:21 +0300, Marko Asplund wrote: Oleg wrote: Please upgrade to 4.3 and have a look at the new execution chain APIs. You can use the caching exec as an example of how HttpClient can be made to respond with a response without hitting the target server. thanks Oleg!

Re: Intercepting and responding to requests on client-side

2013-06-02 Thread Marko Asplund
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

Intercepting and responding to requests on client-side

2013-06-01 Thread Marko Asplund
Hi, I'd like to be able to intercept requests targeted for certain endpoints issued by HttpClient and implement a custom handler for those requests. The handler should be able to generate a response for the requests on the client-side without actually connecting to a remote server. Is this

Re: Intercepting and responding to requests on client-side

2013-06-01 Thread Oleg Kalnichevski
On Sat, 2013-06-01 at 15:37 +0300, Marko Asplund wrote: Hi, I'd like to be able to intercept requests targeted for certain endpoints issued by HttpClient and implement a custom handler for those requests. The handler should be able to generate a response for the requests on the client-side