// The connection URL (统一资源服务器连接)
String url = “https://ajax.googleapis.com/ajax/” +
“services/search/web?v=1.0&q={query}”;
// Create a new RestTemplate instance (产生Rest新模板)
RestTemplate restTemplate = new RestTemplate();
// Add the String message converter (添加String 信息转化器)
restTemplate.getMessageConverters().add(new StringHttpMessageConverter());
// Make the HTTP GET request, marshaling the response to a String
String result = restTemplate.getForObject(url, String.class, “Android”);