Nov 10, 2018

Example of JAX-RS Client API in Java EE 7

try {
            Client client = ClientBuilder.newClient();
            WebTarget target = client.target("http://it.i88.ca/webapi/user");
            String response = target.request().get(String.class);

    } catch (IllegalArgumentException | NullPointerException | WebApplicationException ex) {
            logger.severe("processing of HTTP response failed");
      }