I am trying to create a web API using Jersey. I am trying to run a method similar to this:
WebResource r = c.resource("http://localhost:8080/Jersey/rest/contacts");
However Jersey 2.x does not have a WebResource or Resource class. So what class can I use instead in order to have the uri http://localhost:8080/Jersey/rest/contacts as a parameter?
This will be ran in a ContactClient class
Have a look at the Client API from the Jersey documentation. With Jersey 2.x you instead want to use
WebTarget. For exampleSee the documentation I linked to for much more information and examples.