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 without actually connecting to a > remote server. > > Is this possible with HttpClient? > I've looked at HttpRequestInterceptor and HttpResponseInterceptor > APIs, but these interceptors don't seem to be able to generate the > actual response. > > marko >
Marco, 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. Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
