@Override
public void apply(final Request request) {
authenticationHandler.configure(request);
}
});
final DefaultHttpClient defaultHttpClient = new DefaultHttpClient(new NoOpEventPublisher(),
new RestClientApplicationProperties(serverUri),
ThreadLocalContextManagers.noop(), options);
return new AtlassianHttpClientDecorator(defaultHttpClient) {
@Override
public void destroy() throws Exception {
defaultHttpClient.destroy();
}
};
}