Using RESTEasy directly

Here's a sample client using RESTEasy direcly instead of the standard JAX-RS 2.0:

ResteasyClient client = new ResteasyClientBuilder().build();
target = client.target(url + "services/receiver/delete");
response = target.request().delete();
value = response.readEntity(Double.class);

To implement a client, the only library you need is the RESTEasy client. If you work with maven, you can simply add this library in your pom.xml:

<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
<version>3.0.19.Final</version>
</dependency>
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.196.59