Site reliability engineering - SRE

Changing timeouts

Spring

RestTemplate

Use the HttpComponentsClientHttpRequestFactory to add non-default configuration values to a RestTemplate by doing the following:

HttpComponentsClientHttpRequestFactory httpRequestFactory = new HttpComponentsClientHttpRequestFactory();
httpRequestFactory.setConnectionRequestTimeout(...);
httpRequestFactory.setConnectTimeout(...);
httpRequestFactory.setReadTimeout(...);
RestTemplate restTemplate = new RestTemplate(httpRequestFactory);

results matching ""

    No results matching ""