This repository has been archived by the owner on Oct 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
GroundWork RESTClient QuickStart
Patrick Bösch edited this page Nov 30, 2016
·
2 revisions
<dependency>
<groupId>ch.viascom.groundwork</groupId>
<artifactId>restclient-http</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>
compile 'ch.viascom.groundwork:restclient-http:1.0-SNAPSHOT'
JSONResponse response = new SimpleGetRequest<>("https://jsonplaceholder.typicode.com/posts/1", JSONResponse.class).execute();
System.out.println(response.getResponseHeader());
System.out.println(response.toJson());
String url = "https://jsonplaceholder.typicode.com";
String path = "/posts/1";
SimpleGetRequest<JSONResponse> request = new SimpleGetRequest<>(url, JSONResponse.class);
request.setPath(path);
JSONResponse response = request.execute();
System.out.println(response.getResponseHeader());
System.out.println(response.Json());
Coming Soon