To access the Simplest Possible REST Endpoint from Java, you will have to implement some code:
import javax.ws.rs.client.Client; import javax.ws.rs.client.ClientBuilder; final String URI = "http://localhost:8080/hello-rest/resources/message"; //... Client client = ClientBuilder.newClient(); String result = client.target(URI). request(). get(String.class); assertThat(result, containsString("duke"));
For server-to-server communication no additional dependency is required. If you are using the client as test driver, you will have to declare the dependency to the SPI of you choice e.g.
<dependency> <groupId>org.glassfish.jersey.core</groupId> <artifactId>jersey-client</artifactId> <version>2.21</version> </dependency>
Web Apps, SPA, PWA with vanilla Java Script (ES 6+), CSS 3 and WebStandards only. As simple as possible, but not simpler. See you at: (Progressive) Web apps, Single Page Apps and WebStandards airhacks workshops at MUC airport, Winter Edition
airhacks.fm the podcast:
Stay in touch: airhacks.news.