Is a simple rest client wrapping apache http client.
<dependency>
<groupId>org.rga</groupId>
<artifactId>simple-rest-client_2.11</artifactId>
<version>1.0</version>
</dependency> URL url = new URL("https://somehost:3334");
Response response = new SimpleRestClient(url, true).get("/").request();
assertTrue(response.code() == 200); URL url = new URL("http://other:3333");
Response response = new SimpleRestClient(url, false)
.post("contactos")
.header("Content-Type", "application/json; charset=UTF-8")
.body("{\"value\":3}")
.request();
String result = response.asString(); URL url = new URL("http://localhost:3333");
Response response = new SimpleRestClient(url, false)
.put("contactos", "23")
.header("Content-Type", "application/json; charset=UTF-8")
.body("{\"value\":3}")
.request();
String result = response.asString(); URL url = new URL("http://localhost:3333");
Response response = new SimpleRestClient(url)
.withAuth("user", "pass")
.get("").request();
String result = response.asString();