use of org.openkilda.testing.tools.ExtendedErrorHandler in project open-kilda by telstra.
the class DefaultServiceConfig method buildLoggingRestTemplate.
/**
* Build rest template with enabled logging support.
*/
public static RestTemplate buildLoggingRestTemplate() {
final RestTemplate restTemplate = new RestTemplate(new BufferingClientHttpRequestFactory(new HttpComponentsClientHttpRequestFactory()));
List<ClientHttpRequestInterceptor> interceptors = restTemplate.getInterceptors();
interceptors.add(new LoggingRequestInterceptor());
restTemplate.setErrorHandler(new ExtendedErrorHandler());
return restTemplate;
}
Aggregations