I am pretty new to java and REST, in an application I am currently working on resources/tasks such as bug tracking are to be consumed from launchpad.net in a restful manner. There is an official python library (launchpadlib) that supports such interactions, but I want to do this using Java. I have looked around for samples to get me running to no avail. Does anyone have experience this in Java? Any insights is highly appreciated.
public class LaunchPad_Gatherer {
public static void main(String[] args) {
Client client = ClientBuilder.newClient();
ClientConfig config = new ClientConfig();
//WebTarget target = client.target("http://api.launchpad.net/1.0");
//WebTarget target = client.target("https://api.launchpad.net/1.0/bugs/cve/2015-5223/bugs");
WebTarget target = client.target("https://api.launchpad.net/1.0/bugs/cve");
System.out.println(target.request(MediaType.APPLICATION_JSON).get(String.class));
}
}