0
votes

Spring has a very good client API for REST Client: RestTemplate. Effectively it is like a Facade which encapsulates some bootstrap code (in the same way as JmsTemplate and JdbcTemplate). Is there an equivalent in JBoss's RestEasy? Thanks.

2

2 Answers

0
votes
0
votes

Further on in the doc: http://docs.jboss.org/resteasy/docs/2.3.0.GA/userguide/html_single/index.html#RESTEasy_Client_Framework

ClientRequest clientRequest = new ClientRequest(url);
ClientResponse<String> response = clientRequest.get(String.class);
String resteasystr = null;
if (response.getStatus() == 200) {
   resteasystr = response.getEntity();
   System.out.println("**** " + resteasystr);
}

thanks.