I read a tutorial here. This raised the question how I could handle a request that takes to long (also asked here).
MyCode looks something like this (c&p from the tutorial)
// Create a new RestTemplate instance
RestTemplate restTemplate = new RestTemplate();
// The URL for making the GET request
final String url = "http://10.0.2.2:8080/rest/products";
// Instantiate the HTTP GET request, expecting an array of
// Product objects in response
Product products = restTemplate.getForObject(url, Product.class);
So please tell me: whats the best practice?