0

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.

dublintech
  • 16,815
  • 29
  • 84
  • 115

2 Answers2

0

There seems to be one - RESTEasy client framework

gkamal
  • 20,777
  • 4
  • 60
  • 57
0

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.

dublintech
  • 16,815
  • 29
  • 84
  • 115