Currently I am using Jetty
+ Jersey
to make it possible to have different responses according to the @GET
parameters, if an id
is passed it shall return the task, if not
return all tasks.
@GET
@Path("task")
@Produces(MediaType.APPLICATION_JSON)
public ArrayList<Task> getTask(){
return tasks;
}
@GET
@Path("task")
@Produces(MediaType.APPLICATION_JSON)
public ArrayList<Task> getTasks(@QueryParam("id") String id){
return task(uuid);
}
Is this possible? How can I do it?