0

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));
}

}

SyCode
  • 1,077
  • 4
  • 22
  • 33
  • Have you tried anything? – Sam Jan 15 '16 at 22:30
  • @Sam many thanks. I have written a basic class to query some endpoints. There is very little documentation, maybe most people use python or other approaches...not sure. In my code (just edited initial question to added), I try different resource endpoints. – SyCode Jan 16 '16 at 03:13

0 Answers0