To use RESTful services, the main class provided by spring is RestTemplate
The spring blog has a good article on how to use RestTemplate .
A very simplified example:
class MyServiceClient {
RestTemplate rest = new RestTemplate();
public String get(String thingy){
return rest.get("http://www.example.com/api/stuff/{thingy}", String.class, thingy);
}
}
source
share